After a long period of uncertainty that threatened its survival, Philadelphia Theatre Company has struck a sweet deal to buy back its home.

The troupe on Thursday bought its space at Broad and Lombard Streets for $5 million from TD Bank, which had taken possession of its Suzanne Roberts Theatre after PTC stopped making mortgage payments in 2012; the bank later foreclosed.

"We have the theater again," said arts consultant Michael M. Kaiser, chairman of the DeVos Institute of Arts Management at the University of Maryland. "The turnaround has been hard, this deal was hard. It took a lot of time and lot of attempts and a lot to figure it out. But it's fantastic, and it's done."

The $5 million purchase price is being covered by $3 million in gifts from area philanthropists, plus a $2 million loan from Philadelphia Industrial Development Corp. The bank foreclosed in 2014, and had tried to sell the theater, at the base of the Symphony House condominium, for more than a year even as PTC continued to occupy it with little more protection than a month-to-month lease.

"Securing this building allows us to feel brave enough to create new programming and not feel we are putting the company in jeopardy," said Sara Garonzik, PTC's executive producing director. Kaiser's work in turning around the theater, she said, "has encouraged us to think expansively about the art."

PTC, which moved into its new home in 2007, can now begin to consider developing a smaller, second-floor stage it had originally conceived as a 120-seat black-box theater, Garonzik said - noting that it is a naming opportunity for someone.

Now, instead of being responsible for the $11 million mortgage whose payments crippled the company, PTC will hold a debt of $2 million. The loan, at 6.25 percent interest, requires the company to make relatively small payments of principal and interest over five years, with a single final payment of $1.855 million, says PIDC president John Grady.

PTC paid $750,000 in mortgage and occupancy costs in 2012, tax returns show. The new monthly payment, including principal and interest, is fixed at $12,314.35.

Grady said the loan was given in light of PIDC's history of financing other Avenue of the Arts projects like the Arts Bank, Clef Club, and Symphony House: "We believe our continued support for the city and economic activity on the Avenue of the Arts is important." Plus, he said, "the theater [company] had the ability to acquire the theater for a strong value price. Part of the issue the theater company was dealing with was they weren't able to sustain operations at the original costs, but [by the bank] reducing the price to $5 million, we were able to provide $2 million on an asset worth more than that."

A TD spokesman said the bank had no comment.

The space is collateral in the deal, to be owned by PIDC in the event of default, Grady said.

The prospect of PTC's disappearance sent shivers well beyond the realm of economic development. Playwright Terrence McNally, who has had four world premieres produced by PTC, led a chorus of concerned artists. "I hope people rally to the cause here," he told The Inquirer last year. "It's so important that it does not go under, that the good people of Philadelphia make sure it doesn't. It's too damn important."

Philadelphia playwright Bruce Graham said: "It's tragic for them, but also to the entire Philadelphia arts community and the idea of an Avenue of the Arts. You lose something like that and you'll need to take the sign down" on the Avenue of the Arts.

He was, he said, hoping for an angel.

Instead, at least five materialized: Contributing toward the combined $3 million in bailout money are the William Penn Foundation, Aileen K. and Brian L. Roberts Foundation, Rachel and Drew Katz Foundation, Horace W. Goldsmith Foundation, and Independence Blue Cross.

Ralph and Suzanne Roberts - the theater is named for her in a large, curvy marquee - have been longtime supporters, pledging $2.5 million in rescue aid last year. The Roberts family is PTC's largest private donor. William Penn, a supporter since 1975, gave $250,000 toward the current building purchase, which is in addition to $700,000 in the past two years.

The deal was engineered largely by David L. Cohen, chief of staff of the Rendell mayoral administration and now Comcast executive vice president, who was honored by the theater at its gala in May. Said Garonzik: "It all began with Suzanne, of course, who has been very closely bound to the theater for a number of years. She's been our number-one fan, and I think it spread to the rest of the family. David works very closely with the Roberts family, and I think it all began with that, but we'd like to believe that somewhere along the way he began to like PTC very much. I think he caught the fever."

PTC's new payments are about the same as the reduced rent it has paid TD to occupy the space in a month-to-month agreement crafted after foreclosure. The plan is to quickly raise the nearly $2 million needed to satisfy the loan. Board chairman E. Gerald Riesenbach said, "We hope to repay that debt long before it's due."

For the fiscal year that ended Aug. 31, PTC had a $400,000 surplus. The theater has greatly strengthened its development and marketing efforts, said Kaiser, who will continue to work as a consultant to the company. "It became enormously evident that if we could get the debt sorted out, this is a viable institution, and that is why donors and a lender were willing to talk to us. We're not done. No organization is ever done. But we've made great strides."