Amazon may replace closed department stores at struggling malls.

The company is in talks with Simon Property Group, the largest mall owner in the United States, to convert former or current JCPenney and Sears stores into distribution hubs to deliver packages, the Wall Street Journal reported Sunday.

According to its website, Simon operates four malls in North Carolina, including one in Smithfield. The others are in or near Charlotte. The internet giant is rapidly expanding its footprint in the state.

Amazon already is in the process of establishing a retail outlet at Crabtree Valley Mall in Raleigh, is going to open a new distribution hub in Cary and is in the process of completing a high warehouse/distribution operation in Duram.

Amazon bringing retail ‘4 star’ store to Raleigh’s Crabtree Valley Mall

Both JCPenney and Sears have filed for bankruptcy (Sears has since emerged from Chapter 11) and are closing hundreds of stores. Simon malls have 63 JCPenney and 11 Sears stores, according to its most recent public filing.

The deal could make sense for both Amazon and Simon as the ecommerce landscape shifts and many traditional brick-and-mortar stores are in collapse.

Amazon wants more space closer to where customers live as it builds out its one-day delivery strategy. Malls are typically located closer to highways and residential areas than mammoth warehouses, which would allow Amazon to speed up shipping times to customers.

Mall owners need cash-rich tenants to replace their bankrupt anchor stores. Although Amazon warehouses won’t be attracting much foot traffic, they’ll help to pay the bills.

“It is a win-win for both sides,” said Chris Walton, a former Target executive and now CEO of the retail blog Omni Talk. “Simon gets an anchor tenant and Amazon gets a more localized fulfillment center. For Amazon, the deal would also give it “a front row seat into developing the mall infrastructure for the future.”

Here’s how to go after one of those 3,000 Amazon jobs coming to Garner

It isn’t clear how many stores are under consideration for Amazon, and it is possible that the two sides may fail to reach an agreement, the Journal reported, citing people briefed on the matter. Amazon declined to comment to CNN Business. Simon did not respond to a request for comment.

The talks between Amazon and Simon reflect a growing trend in the retail industry of stores and malls turning into warehouses.

“Underperforming retail sites have become an ideal location for last-mile warehouse developers,” real estate research firm CBRE said in a report last month. “The disruption to the retail sector and the growth of e-commerce will continue to increase the viability” of these conversions.