The intense competition and razor-thin margins of the supermarket business caught up with a longtime homegrown favorite in 2013.

In a dramatic and bittersweet retreat, the local Piggly Wiggly franchisee sold off 29 of its stores to two larger rivals, including most of the retail locations in its own backyard.

Bi-Lo snapped up 22 of the supermarkets in a deal valued at $35 million. Harris Teeter acquired the others, all in the Charleston area, for an undisclosed sum.

Charleston-based Piggly Wiggly Carolina Co. Inc., which dates to 1947, was left with about two dozen corporate-owned supermarkets, including locations in North Charleston, Hollywood, Moncks Corner, Summerville and St. George.

A wave of consolidation has washed over the grocery industry in recent years, creating several big, deep-pocketed chains. That's made it more difficult for smaller, privately owned operators like Piggly Wiggly to compete with them on pricing and purchasing.

JOHN MCDERMOTT

Top headlines

They're carving up the Pig

Piggly Wiggly to shut down Lowcountry warehouses

Piggly Wiggly still has people talking