When a charter school goes out of business, what happens to its building?

Pennsylvania law says that if the school owns its building, that's one of the assets that is supposed to be turned over to the district where the students live.

The rationale: The building was bought with money from the district's taxpayers.

But what happens when the building is owned by a related nonprofit and was financed by a bank?

With Friday's shuttering of the Wakisha Charter School in North Philadelphia, taxpayers will find out.

Even though the charter has spent $3.8 million in School District money since January 2010, the building near Temple University will wind up in the hands of the Wakisha Foundation.

Wakisha also collected $160,444 from the state through the Education Department's lease-reimbursement program.

"Taxpayers have been paying for the building in some way, shape, or form," said state Auditor General Eugene DePasquale, who has warned of problems when charters rent buildings from nonprofits they created.

"This is another reason why I have been raising alarms about these arrangements," he said in an interview.

But John L. Pund Jr., the financial consultant Wakisha's board hired to oversee the charter's liquidation, said the nonprofit would not affect what happens to the building. Because the nonprofit is considered a component of the school, he said, they are essentially the same entity.

Pund, managing director of JPC & Associates L.L.C. of Newtown Square, said he was involved with two similar charter dissolutions in Chester-Upland that resulted in money being returned to that district after creditors were paid.

"That's my objective here," he said.

Wakisha opened in 2000 with an Afro-centric focus for sixth, seventh, and eighth graders. Last month, Wakisha's board voted to close the school because it was on the verge of financial collapse.

The charter, which has struggled with academics and enrollment for years, had 261 students last month. It had fewer than 80 last week.

A small number of Philadelphia charters have closed, but none was housed in a building owned by a nonprofit created to be its landlord.

Pennsylvania's 1997 charter law does not provide money for the schools to buy buildings. In the early days, charter operators said lenders were reluctant to give mortgages to schools authorized to operate for only five years. As a solution, many set up nonprofits to buy buildings for the schools to lease.

In 2001, the legislature gave charters another reason to use nonprofits, when it created a program to reimburse them for part of their rental costs.

The Wakisha Foundation was created in 2006 to support the charter, state records show.

After leasing the upper floors of a building for years in the 1200 block of Vine Street, Wakisha's board decided in 2009 that the school should have its own facility.

The Wakisha Foundation paid $1.9 million for a property at 900 W. Jefferson St. that had housed a commercial laundry. It spent $7.2 million on renovation and construction.

At the school's May 2009 groundbreaking, a news release said the building would be transformed into a 53,000-square-foot, state-of-the-art education center.

According to financial statements Wakisha submitted with its annual report, the foundation financed the project with a $6.3 million mortgage and a $418,762 construction loan from Bancorp Bank. It also got a $1.7 million mortgage from the Nonprofit Finance Fund of New York City.

The charter school guaranteed the mortgages, and the building and its assets were used to secure the deal.

Wakisha then rented the building from the foundation. The 20-year lease set annual payments at a minimum of $807,900.

The charter has occupied the building since 2010. As the school struggled to maintain enrollment, the building was a drain on its resources.

According to the latest data on the state Department of Education website, Wakisha, in the 2012-13 school year, spent $1.1 million on building and maintenance costs - 24 percent of the $4.5 million in taxpayer funding it received.

Pund, who is handling the dissolution of Wakisha, said he had been communicating nearly every day with representatives from Bancorp and the Nonprofit Finance Fund.

"I think the likelihood is that the building will be part of the liquidation."

Pund anticipates Wakisha's building will be appraised and listed for sale with a broker to maximize the value so it can be sold for a price high enough to satisfy all creditors and have money left over to return to the School District.

"There is truly an opportunity to make everybody whole," Pund said, "but we have to be smart about how we do it."

After the Village Charter School merged with the Chester-Upland School District in 2008, Pund said, the liquidation eventually returned more than $1 million to that district.

Philadelphia School District spokesman Fernando Gallard said officials would check with the charter "to make sure that if there are assets or real property, we take control of those."

@marwooda