BET Investments of Horsham took a leap of faith when it acquired the ailing Granite Run Mall  in September 2013 for $24.2 million.

The previous owner had walked away in 2011 from a $128 million outstanding loan on the abandoned suburban mall, leaving the keys and mortgage to the lenders.

The mall in Middletown Township, Delaware County, closed in summer 2015 so BET could tear it down and create the Promenade at Granite Run, a mixed-used development with entertainment, housing, and health care that may show what middling malls can become.

In many ways, Granite Run mirrors what's been playing out nationally, say experts, as anchor department stores continue to close and digital shopping intensifies.

More mall owners are surrendering properties to lenders or disposing of poor performers, said Edward Dittmer, vice president of credit mortgage-backed securities for Morningstar Credit Ratings. "Malls are facing more intense competition from retail power centers and lifestyle centers as well as from online retail."

Before the last recession,  CMBS's were issued like crazy to finance malls, where lenders would chop up the loans and sell them as bonds to investors.

The loan on Granite Run was part of a $2.45 billion CMBS pool issued in 2006 by Deutsche Bank Securities and what was then Banc of America Securities. The Granite Run loan was originally for $122 million, according to SEC documents.

But in recent years, financing has become tightened for struggling malls. The pool of buyers and investors to resurrect them has also shrunk as property values have plummeted, reported Green Street Advisors of Newport Beach, Calif., which tracks malls nationally.

While an A++ trophy mall such as King of Prussia and A malls in strong markets such as  Cherry Hill continue to thrive, declining retail traffic, especially at B and C malls, is causing anchor stores to close, said Steve Jellinek, vice president of CMBS  at Morningstar Credit Ratings. The survivors "will continue to renegotiate their leases, or exit malls altogether."

Pruning has been the plan for Pennsylvania Real Estate Investment Trust, which owns several retail centers in the region, including Cherry Hill, Moorestown, and Plymouth Meeting Malls.

Last month, PREIT sold Beaver Valley Mall in Western Pennsylvania for $24.2 million after Royal Dutch Shell announced plans to build a petrochemical plant nearby that would generate thousands of jobs.

PREIT CEO Joseph Coradino said the firm isn't selling to avoid bankruptcy or foreclosure, but rather to invest "in higher-quality assets and strengthen our portfolio."

Since 2012, PREIT has sold 16 lower-productivity malls and other non-core properties, generating $720 million in gross proceeds, to focus on more diversified properties with retail, dining, and entertainment.

Among the reasons for the mall closures: The United States has too much retail compared with other countries, said Chicago-based Mark Hunter, managing director of retail asset services for the Americas at CBRE Inc.

There were 24 square feet of retail per capita in the U.S., compared with 16  square feet per capita in Canada, he said, citing figures from the International Council of Shopping Centers.

"It's the C malls —whether they're in large markets like Philadelphia, or smaller markets —if there is a department store that has closed, it's more of a challenge. You will continue to see some more malls that need to be redeveloped into mixed-use properties with less retail."

In its heyday, Granite Run Mall was anchored by Sears, Boscov's, and JCPenney. It also had freestanding Kohl's and Acme stores.

Simon Property Group and Macerich Group bought Granite Run Mall in 1998 as part of a joint venture. The owners made regular payments on the loan.

But the loan was placed in "special servicing" on Oct. 25, 2010, because the property wasn't generating enough profit to cover the debt. The mall was foreclosed on in 2011.

By 2013,  BET president Michael Markman decided to bid on the two-story mall.

He faced little competition. The mall that year was generating a very unhealthy $160 in sales per square foot. (King of Prussia Mall generates $975 in sales per square foot). There were only  two other "serious" bidders for Granite Run.

Markman and partner Bruce Toll, a founder of Toll Bros., want to create a new version of a town center.

Under a $120 million redo, BET is putting in a theater/bowling alley by the owner of Revolutions in Fishtown to replace the JCPenney that left in 2014; a dozen restaurants; 400 apartments; and tons of retail, 808,000 square feet of it, and 12,000 square feet of office space for a pediatric office of the Children's Hospital of Philadelphia and a DMV office.

Markman said 85 percent of the retail space has been leased by Rob Cooper, senior vice president at Metro Commercial, the mall's sole leasing agent.

"The key to being successful  is to see what other people don't see," Markman said of being a developer. The project received township approvals to begin construction this week on two retail buildings. It began the CHOP office a month ago.

"The live/shop/work/environment is what people are looking for," Markman said. "It's almost a blueprint for success for these enclosed malls all over. They tend to be good real estate."

The mall, which is to open in March 2018,  sits on a major artery —Baltimore Pike —and is near Routes 1, 352, and 452. You  can get off the Blue Route on the Route 1 bypass to get to the mall easily.

"If you can park and just walk to things, it's much more desirable,"  Markman added.

A number of failing malls are undergoing re-adaptive uses nationally:

Rackspace, a Web softwear developer, moved its corporate headquarters to the defunct Windsor Park Mall in northeast San Antonio about seven years ago; Natick Mall west of Boston added a luxury residential condo tower; Oakbrook Center in Chicago added a bowling alley (Pinstripes); Manhattan Town Center in Manhattan, Kan., added an IMAX theater to replace a vacant Sears store; And Vanderbilt Medical Center took over the entire second level of 100 Oaks Mall in Nashville, to use as medical offices and services.

"The trend of redeveloping these properties into mixed uses will probably continue for the next 5 to 10 years," CBRE's Hunter said. "We are just starting out."