The sprawling suburban mall is increasingly the exception.

Dozens nationwide have shuttered in the past decade, and a quarter of the estimated 1,100 that remain are projected to follow by 2022, opening large swaths of empty space.

“We built too many malls, and we built them too cheaply,” said Amanda Nicholson, a professor of retail practice at Syracuse University. “Only the strong will survive, while the weaker ones idle and fold.”

The die-off has created challenges for the municipalities and developers tasked with repurposing millions of square feet of vacant retail space and parking lots. But the successes have taken multiple forms: community colleges, public preschools, churches and libraries. Some old malls have turned into micro-apartments or microbreweries, and at least one abandoned shopping mall is now an Amazon fulfillment center, offering a glimpse into consumers’ shifting habits and priorities.

Here, a look at five ways malls around the country are coming back.

Megachurches

Lexington Mall had been sitting empty and abandoned for years when leaders at Southland Christian Church saw its potential.

The evangelical Christian church in Kentucky bought the mall for $8 million in 2010, then spent $33 million transforming it into a house of worship that attracts 6,000 attendees each Sunday. Much of the 40,000-square-foot mall had been knocked down and built back up; what once was a Dillard’s department store now holds classrooms, offices and nurseries.

“The big challenge was getting our head around the scope of the mall,” said Chris Hahn, the lead executive pastor. “When you gut a Winn-Dixie building … you’re pretty much left with four walls and a lot of open space. But a mall? That’s much larger.”

Across the country, real estate experts say they’re seeing more megachurches taking up shop in former malls, where parking is plentiful and space abounds.

In Grandville, Mich., Mars Hill Bible Church holds Sunday services in a former department store. The church took over the abandoned Grand Village Mall in 2000 and turned a big-box anchor into a sprawling chapel. (Water pipes from a former fountain in the middle of the store are now used to fill the baptism tank.) About 1,500 people attend each Sunday, and church leaders say there is plenty of room to expand.

“It’s big and wide, with a lot of open spaces for people to gather in between services,” said Troy Hatfield, an associate pastor. “We took a place intended for consumerism and transformed it into a place for worship.”

Medical clinics

There was no question about it: One Hundred Oaks Mall in Nashville was dying.

It was time to call in the doctors.

In the decade since Vanderbilt University Medical Center took over the sprawling property, it has become a bustling center of activity. The university spent $99 million renovating the mall, which now houses about two dozen specialty clinics, including pediatrics, dermatology and neurology.

“It has been a complete transformation,” said Steve Johnson, executive vice president at Gresham Smith, the architecture and engineering firm that oversaw the project. “The mall has gone from low-traffic to high-traffic.”

He attributes that change to the “huge flow of patients” who stop in for routine appointments each day, as well as the 1,000 doctors, nurses and medical professionals who work there. About a dozen retailers, including T.J. Maxx and Guitar Center, remain on the ground floor.

Shopping malls are increasingly adding eye doctors, dental offices and cancer centers to their lineups. Medical clinic leases at shopping malls have grown nearly 60 percent since 2017, while leases for clothing stores have fallen about 10 percent, according to data from CoStar Group.

The nation’s largest mall, the Mall of America in Bloomington, Minn., this month opened a 2,300-square-foot walk-in clinic with exam rooms, X-ray machines and a laboratory. The facility — run by M Health Fairview in a former Shake Shack — offers physicals, travel vaccines, blood pressure checks and other routine medical services. Executives say they hope the clinic will serve the 40 million visitors who come to the mall each year, as well as the 13,000 people who work there.

“The focus is on things you can’t get online,” said Jill Renslow, senior vice president of business development for the mall. “Dining, entertainment, services — and flu shots.”

Homeless shelter

At first the idea elicited incredulity: a homeless shelter in a shopping mall?

Carpenter’s Shelter was 18 months into its search for a new space in Alexandria when someone mentioned a local shopping mall that had fallen into disarray.

“Everyone chuckled as though it was going to be a running joke,” said Shannon Steene, the nonprofit’s executive director. “But now here we are: a 60-bed shelter at the old Landmark Mall.”

The mall’s owner, the Howard Hughes Corp., is not charging any rent. Eventually, though, it plans to demolish the mall and replace it with a mixed-use development.

The shelter will move out of the mall next summer, when it finishes renovating a former Department of Motor Vehicles building.

The shelter takes about 18,000 square feet in a former Macy’s. A Sears store in another part of the mall is still open to the public. Other parts of the mall were recently used to film scenes for the upcoming “Wonder Woman” sequel.

Fitness centers

After losing three of its four anchor department stores, the country’s oldest shopping mall was in need of new life.

Southdale Center in Edina, Minn., is getting it this month in the form of a Life Time “resort,” complete with a rooftop pool and beach club.

The new gym — which also has a full-service spa, cafe and co-working space — will take the place of a former J.C. Penney store. Life Time is spending $43 million building the three-story facility.

“Malls have become a phenomenal opportunity for growth,” said Parham Javaheri, executive vice president of real estate and development at Life Time. “They have great visibility, great access and many of them have been around for a long time, so they’re located at the center of offices and residences.”

Fitness centers and gyms now lease three times as much space in U.S. shopping malls as they did a decade ago, according to data from CoStar Group. Chains such as Planet Fitness, SoulCycle and Life Time have become coveted tenants because they attract a steady stream of affluent members who stop in a few times a week.

Life Time now has country club-like locations at malls around the country — including the Houston Galleria, Tampa’s International Plaza, and Oklahoma City’s Quail Springs Mall — and plans to open more than 30 more mall gyms in coming years. The company tends to take over spaces left behind by large department stores such as Macy’s, Sears and Lord & Taylor, which tend to have their own parking lots and access to the broader mall.

Each gym attracts about 3,000 people a day, Javaheri said, which amounts to “a lot of consumers.”

Video gaming hubs

Philip Kaplan has a plan to get teenagers and 20-somethings back into shopping malls: video games and food.

The chief executive of esports giant GameWorks says he is investing heavily in mall-based gaming lounges, arcades and eateries in hopes that creating communal gathering spaces and Fortnite tournaments will help turn decaying retail centers into destinations.

“Malls have a lot of great locations, and we have a captive audience,” he said. “It’s a win-win.”

Shopping malls, he said, have become an increasingly attractive — and affordable — option in both cities and suburbs because they offer large spaces, easy access to parking and proximity to young Americans. Early next year, GameWorks is opening an esports lounge at the Westfield Oakridge in San Jose, where it will take over a two-story space left behind by furniture chain Ethan Allen.

“That’s a lot of space where can go and negotiate,” Kaplan said. “We’re getting into great locations that may have been completely full a couple of years ago.”

Competitor PlayLive Nation, meanwhile, has opened dozens of mall locations, where visitors can play games such as Call of Duty, Yu-Gi-Oh! and Super Smash Bros.

Simon Property Group, the country’s largest mall owner, recently invested $5 million in Allied Esports and announced plans to create 200 mall gaming lounges for competitive video gaming events across the country. It’s also creating a video gaming tournament, called the Simon Cup, that will take place in malls in New York and Los Angeles, with final championship rounds in Las Vegas.

“ ‘Harry Potter: Wizards Unite’ is exactly the type of cutting-edge activation our customers get excited about playing,” said Lee Sterling, a senior vice president at Simon. “We believe elevated gameplay will drive traffic and excitement for our properties.”