Thousands of mall-based stores are shutting down in what’s fast becoming one of the biggest waves of retail closures in decades.

More than 3,500 stores are expected to close in the next couple of months.

Department stores like JCPenney, Macy’s, Sears, and Kmart are among the companies shutting down stores, along with middle-of-the-mall chains like Crocs, BCBG, Abercrombie & Fitch, and Guess.

Some retailers are exiting the brick-and-mortar business altogether and trying to shift to an all-online model.

For example, Bebe is closing all its stores — about 170 — to focus on increasing its online sales, according to a Bloomberg report.

Some are going out of business altogether, like The Limited which recently shut down all 250 of its stores.

Others, such as Sears and JCPenney, are aggressively paring down their store counts to unload unprofitable locations and try to stanch losses.

Mike Nudelman

Sears is shutting down about 10% of its Sears and Kmart locations, or 150 stores, and JCPenney is shutting down about 14% of its locations, or 138 stores.

According to many analysts, the retail apocalypse has been a long time coming in the US, where stores per capita far outnumber that of any other country.

The US has 23.5 square feet of retail space per person, compared with 16.4 square feet in Canada and 11.1 square feet in Australia, the next two countries with the most retail space per capita, according to a Morningstar Credit Ratings report from October.

Visits to shopping malls have been declining for years with the rise of e-commerce and titanic shifts in how shoppers spend their money. Visits declined by 50% between 2010 and 2013, according to the real-estate research firm Cushman & Wakefield.

A Sears store in the Woodbridge Center.Business Insider/Sarah Jacobs

And people are now devoting bigger shares of their wallets to restaurants, travel, and technology than ever before, while spending less on apparel and accessories.

As stores close, many shopping malls will be forced to shut down as well.

When an anchor store like Sears or Macy’s closes, it often triggers a downward spiral in performance for shopping malls.

Not only do the malls lose the income and shopper traffic from that store’s business, but the closure often triggers “co-tenancy clauses” that allow the other mall tenants to terminate their leases or renegotiate the terms, typically with a period of lower rents, until another retailer moves into the anchor space.

To reduce losses, malls must quickly find a replacement tenant for the massive retail space that the anchor store occupied, which is difficult — especially in malls that are already financially strapped — when major department stores are reducing their retail footprints.

That can have grave consequences for shopping malls, especially in markets where it’s harder to transform vacant mall space into non-retail space like apartments, according to analysts.

The nation’s worst-performing malls — those classified in the industry as C- and D-rated — will be hit the hardest by the store closures.

The real-estate research firm Green Street Advisors estimates that about 30% of all malls fall under those classifications. That means that nearly a third of shopping malls are at risk of dying off as a result of store closures.