To save Pittsburgh’s oldest brewery, its owners have abandoned their bankruptcy case in hopes of attracting a new buyer.

Penn Brewery filed for Chapter 11 bankruptcy in March amid $5.1 million in debt owed to First Commonwealth Bank. The bankruptcy filing allowed the brewery to continue operating while it worked through its financial troubles.

Earlier this month, Penn Brewery said it could no longer afford to finance its legal proceedings while keeping its doors open.

On Aug. 3, the brewery filed a motion for expedited dismissal of its bankruptcy case, relinquishing its business assets to First Commonwealth Bank.

“When the Debtor filed this Chapter 11 case, its primary concern was to avoid any disruption of its business operations,” said Penn Brewery’s lawyers in court filings. “Without the ability to confirm a feasible plan, let alone fund ongoing administrative costs associated with this case, the Debtor has no choice but to seek the prompt dismissal of this case.”

On Wednesday, a judge granted Penn Brewery’s request.

In June, Penn Brewery narrowly avoided a sheriff’s sale, which would have scheduled the its North Side location and adjacent lot at 906 Vinal St. for public auction.

Now, the brewery may be saved by a buyer.

David Valencik, one of the attorneys representing Penn Brewery, said it’s too early to announce who the potential buyer is.

He said the owners had to abandon their Chapter 11 filing status because they had begun preliminary negotiations with the party and could not move forward with discussions until their case had been dismissed.

Valencik added that if the sale goes through, the brewery will be able to keep its doors open despite the transition of ownership.

“The idea is that there will be no interruption to business operations,” Valencik said. “This is all being done so that the brewery stays open.”

Valencik said that while the bank retains all of the assets in the wake of the dismissal, the new buyer may repurchase them.

“There are no deals yet,” Valencik said. As of Thursday afternoon, the new buyer and Penn Brewery’s legal team were discussing a management contract, which could trigger a transfer of ownership.

The debt remains with Penn Brewery Inc., according to court filings.