Kroger Co., the nation’s largest grocer with close to 4,000 locations, recently bought a former Macy’s space at Kingsdale Shopping Center in Upper Arlington, Ohio. (Sean Proctor/Bloomberg News)

For decades, department stores like Macy’s and Sears have anchored sprawling suburban malls. Now as their business has languished and they board up shop, another sort of tenant is trying its luck in their place: grocers.

“There has been a real acceleration of anchors closing their operations,” said Mark Ordan, who knows both sides of the equation as former chief executive of Fresh Fields and a former chief executive of a leading mall operator. “As traditional anchors leave, it’s an opportunity for both the mall owner and the supermarkets.”

Just last month, shares of mall real estate investment trusts tanked after J.C. Penney announced plans to close up to 140 stores this year. The mall-quake followed a spate of bad news in recent months from Macy’s and Sears, two traditional mall anchors who said they plan to close hundreds of underperforming stores.

[Macy’s is closing 100 stores: Does yours stand a chance?]

Ordan said malls are great locations for big grocery stores because of their parking, the visibility and the large format they provide.

“It makes it very attractive for the tenant,” he said.

It also suits the millennial shopper, who prefers the efficiency that combines a visit to the mall with retrieving that week’s groceries.

The grocery store inhabiting the mall isn’t exactly new, but “it’s certainly an emerging trend,” said Tom McGee, chief executive of the International Council of Shopping Centers. “Part of it is convenience, the ability to do things in one location. Millennials value convenience.”

Kroger Co., the nation’s largest grocer with close to 4,000 locations, recently bought a former Macy’s space at Kingsdale Shopping Center in Upper Arlington, Ohio.

At the Natick Mall in Massachusetts, according to a report in the Wall Street Journal, Wegmans Food Market is leasing 194,000 square feet of space vacated by J.C. Penney.

365 by Whole Foods is set to open this year at College Mall in Bloomington, Ind., the report said.

And other negotiations are underway.

Groceries or not, the traditional mall is looking different.

Higher-end malls with underperforming anchors such as J.C. Penney, Macy’s, Bon-Ton and Sears are renting to movie complexes, food courts, restaurants and fitness centers instead, emphasizing experiences and fun over shopping.

“Part of it is a survival tactic,” said Calvin Schnure, an economist with the National Association of Real Estate Investment Trusts. “E-commerce is changing people’s spending patterns. But in the process, they are changing the shopping experience in a mall.”

Grocery store experts say supermarkets would rather be the main attraction in a strip mall than take the anchor position in a suburban mall.

“The fact that there’s vacant mall space at the old-school, indoor malls and the hit they are taking from online companies is really significant,” said Jeffrey Metzger, publisher of Food World, a publication covering the grocery industry. “If you talk to Giant, Safeway or Kroger, the old-world mall is not their target. They would still like to be on Main Street.”

Jeff Edison is chief executive of Phillips Edison & Co., which owns 339 shopping centers across the nation, nearly all of which are anchored by a grocery store.

“The traditional grocers are going to continue to be three miles from people’s houses as opposed to the more regional locations like the malls,” he said. “It’s all driven by convenience.”

Edison said shopping centers allow grocery customers to park closer to the store and give easier access by being closer to their communities than malls.

“You may get your nails done and pick up dry cleaning next to a grocery business,” he said, “but it’s driven on a necessity basis as opposed to an impulse purchase, which is what the malls are driven by.”

Not all malls renting to grocers are troubled. Some individual tenants may be underperforming because of lack of reinvestments and upkeep while the mall overall is healthy. But a grocer can be a welcome replacement to exploit a prime piece of real estate.

Grocers can bring several assets to a mall, including heavy and routine foot traffic. A Kroger could generate $50 million in sales at its mall location compared with an aging department store generating $10 million or $15 million a year.

[By selling its European brands, GM ‘gets rid of a perennial loser’]

“Losing a mall anchor and replacing it with a grocery store adds a ton of value to a mall,” said Margaret Caldwell, managing director at JLL, a real estate services firm. “Some of these malls, the anchors aren’t generating a lot of foot traffic. If you put a grocer in there, people will be there doing their weekly grocery shopping versus shopping once a month at Macy’s.”

McGee said it has less to do with the disruption from online retailers and more to do with opportunism between landlord and tenant. He pointed out that online sales are still dwarfed by the nearly $5 trillion a year at brick-and-mortar retailers.

“As space opens up in a mall or regional shopping center, the property owner and developer looks at the demographics and needs and matches up the space with the needs of the area,” McGee said. “It is all about driving traffic, driving folks to the shopping center. The best way to do that is to look at what is needed in that area and match up the needs with this space.”

Cliff Logan worked as an executive at Giant Food for 12 years and now runs a sausage company in Northern Virginia. Logan splits his time between Boca Raton, Fla., and Arlington. He said many malls, particularly older locations, are being hit hard by Amazon.com and online purchases.

“Amazon is putting a big hurt on a lot of these malls,” he said. “There’s a mall in Palm Beach with two or three schools in it, a synagogue and newspaper publisher in it, and a place where you can buy a cup of coffee and doughnut. There’s not a single retail store in it.”

Read more:

A Trump voter’s message to retailers: ‘Keep your mouths shut about our president’

This beloved grocery chain is the latest company to face Trump-related boycotts

You’ll soon be able to get a Big Mac delivered to your door. But will you want to?