Photo

A federal judge on Thursday rejected a deal that Detroit had negotiated to help it move forward in bankruptcy, but he did offer some hope, saying the city could borrow $120 million it says it urgently needs to provide services to its residents.

Judge Steven W. Rhodes of United States Bankruptcy Court, in a decision many viewed as a big surprise, said that Detroit had hurt itself with hasty and imprudent decisions in the past, and that the practice “must stop.”

He ruled that Detroit could not proceed with a plan to pay $165 million to two big banks to extricate itself from some long-term financial contracts that have been costing the bankrupt city tens of millions of dollars a year.

Photo

“It’s just too much money,” Judge Rhodes said. He urged the two sides to try to negotiate a new settlement but also did not rule out a lawsuit.

The rejected deal stemmed from a plan by Detroit’s emergency manager, Kevyn D. Orr, to obtain a special $285 million loan from Barclays to operate in bankruptcy. Without the loan, Detroit said, it would soon run out of cash and not be able to pay its workers.

But because Detroit is already in default on some of its bonds, it could not easily take on new debt without pledging collateral. It wanted to pledge the revenue it takes in by taxing local casinos — but that money was already pledged to the two banks, Bank of America and UBS, as collateral for the financial contracts, known as interest-rate swaps, that were used to help finance pensions.

Detroit planned to use $165 million from the Barclays loan to cancel the swaps contracts, which would free up the casino money. That would leave $120 million to help run the city.

But Judge Rhodes refused to sign off on the deal, saying it was “reasonably likely” that Detroit could succeed if it challenged the swap transaction head-on by suing the two banks.

Mr. Orr testified that he had in fact considered suing the two banks to get out of the swaps, and even had his staff draw up a complaint. But in the end, he decided that such a lawsuit had just a 50-50 chance of success and that it would take too long at a time when Detroit urgently needed the casino revenue to secure a fresh loan.

While the judge allowed the city to borrow $120 million, it was unclear on Thursday whether Barclays was still willing to make the loan without resolution of the swaps issue or what the terms of a smaller loan would be. Judge Rhodes also placed conditions on the borrowing, saying that the money could be used only for purposes approved by the Michigan Gaming and Revenue Control Act and that the city must file notice with the court when it wanted to use it, giving creditors 14 days to object.

In delivering his ruling orally on Thursday, Judge Rhodes said he had reviewed the arguments Detroit would have made had it pursued a lawsuit, and thought they had merit. He said $165 million was “higher than the highest reasonable number.”

“If it were close, the court would approve it,” he said. “But it’s not close.”

The ruling was seen as a vindication for Detroit’s residents and its other main creditors, which stood to take a back seat to the new Barclays loan. They were arguing that the swap contracts appeared to have been illegal to begin with and should be voided rather than paid by the bankrupt city. Some even called for Detroit to claw back the millions of dollars it has already paid the two banks on the swaps.

“It’s a recovery for the people of Detroit,” said Abayomi Azikiwe of the Moratorium Now Coalition, who was outside the courtroom when Judge Rhodes made his ruling. “It’s a major win that could have national implications as other cities undergo bankruptcy.”

In a statement, Mr. Orr said: “We are reviewing today’s decision and we are thankful the court has approved our ability to pursue quality-of-life financing for the benefit of the city’s 700,000 residents. As recommended, we will continue to work toward a resolution of the pension swaps.”

Interest-rate swaps have been widely used in municipal borrowing, and other cities and counties have learned to their dismay that the long-running contracts are almost impossible to get out of without paying the total market value. Even in bankruptcy, the law gives swap traders the ability to be paid in full. Congress exempted such contracts from the bankruptcy rules that normally keep creditors from hounding bankrupt debtors.

The so-called safe harbor for derivatives like swaps contracts has raised eyebrows in Chapter 11 corporate bankruptcies, but until now it had not surfaced in a Chapter 9 municipal bankruptcy.

Detroit entered into the swap contracts in 2005, when it tapped the municipal bond market for $1.4 billion to put into its workers’ pension funds. Much of the deal was structured with variable-rate debt, and the swaps were intended to work as a hedge, to protect Detroit if interest rates rose. But rates fell, and under those circumstances, the terms of the swaps called for Detroit to make regular payments to UBS and Bank of America. The swaps cost Detroit about $36 million a year.

The 2005 borrowing also required an unusual structure to avoid violating the city’s legal debt limit. In 2009, the debt was downgraded to junk, putting the city out of compliance with the terms of the swaps. So Detroit restructured the swap obligations, offering the two banks the tax revenue that it received from local casinos as a backstop.

When Detroit declared bankruptcy last summer, it estimated the cost of terminating its swaps at about $345 million. The amount changes according to fluctuations in interest rates.

Days before filing its bankruptcy petition, Detroit said Bank of America and UBS had given it a break, so that it would have to pay only about $250 million to cancel the contracts. In the months since then, the amount dwindled to about $220 million. But other creditors, facing bigger relative losses, complained that the two banks were still getting way too much. They argued, among other things, that the interest-rate swaps were invalid from the beginning because the use of casino taxes for financial hedges is not allowed under state law.

With complaints about the swap payment mounting last December, Judge Rhodes sent the parties back to renegotiate their deal with the help of another federal judge, Gerald E. Rosen, the chief justice for the Eastern District of Michigan. Judge Rosen is the lead mediator of the Detroit bankruptcy, trying to negotiate settlements among Detroit’s more than 100,000 creditors to keep the huge bankruptcy from being mired in endless lawsuits.

It was Judge Rosen who persuaded Bank of America and UBS to agree to the $165 million figure just before Christmas. Creditors were by then so perturbed about the situation that they filed a complaint against him for misconduct when he announced the deal and said he would recommend that Judge Rhodes approve it.

Mary M. Chapman contributed reporting from Detroit.