Retail space devoted to food sales in the US has hit a record high.

New store growth is outweighing demand, and grocers are cutting prices to compete.

Department stores followed the same strategy in the last decade, and now they are closing stores and filing for bankruptcy at staggering rates.

Department stores and many mall-based retailers are closing thousands of stores after years of over-expansion. Now the grocery industry appears to be heading toward a similar fate.

Like mall-based retailers did in the 1990s, supermarkets have been expanding rapidly across the US in recent years.

"Over the past 10 years, we saw high growth from some of the more traditional players, which has resulted in saturation in the US, and forced mainstream supermarkets to slow openings," Danielle Dolinsky, an analyst at retail consulting firm Planet Retail RNG, told Business Insider.

For some companies, however, the pace of growth is only accelerating.

Discount grocers including Aldi, Lidl, and Dollar General are collectively planning to open thousands of new stores over the next couple years.

At the same time, tech companies like Amazon — with its recent acquisition of Whole Foods — are also entering the food wars.

Competition is ramping up at a time when the amount of retail space devoted to food sales in the US has already hit a record high.

The US has 4.15 square feet of retail food space per person, which is nearly 30 times higher than in 1950, according to CoStar Group data cited by the Wall Street Journal.

But demand hasn't kept up with unit growth.

Total US grocery sales fell nearly 2% in the 12-week period ending July 15, compared to last year, according to Nielsen data. The US food retail market is highly fragmented. UBS

Grocery stores have been slashing prices to drive sales and better compete, which is driving profits lower in a business that's already pressured by razor-thin margins.

Whole Foods' same-store sales have been falling for the last two years. Even long-dominant companies like Kroger, the largest supermarket chain in the US, are taking a hit.

Kroger's impressive 13-year streak of quarterly same-store sales increases ended earlier this year. That metric has now dropped for the last two consecutive quarters.

Kroger blamed the declines on food price deflation.

It's also facing growing price competition from Aldi, Dollar General, Lidl, Walmart, and others.

A 2014 price study found that Aldi's prices were about 22% cheaper than Kroger's. Aldi has more than 1,600 stores in the US with plans to open another 600 within the next couple of years.

The German grocery chain Lidl is planning a massive expansion in the US. Business Insider/Hayley Peterson Walmart is also investing in its grocery department. The company has been expanding its click-and-collect program that allows customers to order groceries online, then pick them up at stores. Walmart also reduced prices on hundreds of grocery products last year and recently launched a grocery price-comparison test in 1,200 stores in an effort to edge out Aldi.

Business Insider compared prices at both chains in 2015 and found that Walmart was about 30% more expensive than Aldi.

Now, there's even more pressure to lower grocery prices with newcomer Lidl entering the US market.

Lidl, which has more than 10,000 stores globally, just launched its first US stores in June and plans to have 100 stores operating along the East Coast by mid-2018.

Dollar General is opening 1,000 stores this year. Business Insider/Hayley Peterson Grocers near the new Lidl stores have already started dropping prices to better compete, according to a recent price check by Jefferies analysts in several Southeastern markets.

The Dollar General store in Roebuck, South Carolina dropped prices by 10% to 30% in response to Lidl entering the market, analysts said. Food Lion has also cut prices in markets where it competes directly with Lidl. The company sent executives to Lidl's stores in other countries ahead of its US launch to better understand the concept.

History is repeating itself

Department stores and many mall-based retailers started engaging in a similarly aggressive price war during the recession following years of over-expansion, and most never recovered. Shoppers grew accustomed to the constant discounts and stopped shopping full-price. Now, these retailers are closing stores, shedding jobs, and filing for bankruptcy at staggering rates.

Grocery stores could be heading down the same path. But they have one major advantage over department stores: e-commerce is less of a threat.

Shoppers have been slow to migrate online for their grocery shopping needs. Food accounts for less than 1% of total online sales in the US, according to a recent Goldman Sachs report.

The supermarkets that survive and thrive over the next decade will have to find ways to shave operating costs — primarily through the use of smart technology that strengthens inventory management and robots that improve the customer experience — and funnel those savings into ongoing price cuts.

Companies like Kroger and Walmart are already investing in these technologies. But many others are "unwilling, or unable, to engage," Goldman Sachs analysts wrote in a research note published Wednesday.

It's not yet clear who the winners will be as the grocery wars shake out, but there's little doubt that consumers will benefit as chains are forced to continue dropping prices and offer more convenient shopping services to compete.