A judge overseeing Detroit's bankruptcy again rejected a deal Thursday to get the city out of a disastrous financial agreement with major banks.

LANSING, Mich. — A judge overseeing Detroit's bankruptcy again rejected a deal Thursday to get the city out of a disastrous financial agreement with major banks.

Judge Steven Rhodes turned down a more than $165 million compromise, saying "it's just too much money," about 67 cents on every dollar owed to the banks as of Dec. 31. He had rejected a $230 million deal in December.

He encouraged the city and banks to keep negotiating. After making his decision, he cleared the courtroom to talk privately to lawyers.

Reaching an agreement is considered a key step as the city comes up with a sweeping plan to exit bankruptcy.

Two judges who acted as mediators in the deal, Detroit Chief U.S. District Judge Gerald Rosen and Oregon U.S. Bankruptcy Judge Elizabeth Perris, had endorsed it last month.

"This settlement ... can best be captured and characterized by the admonition, 'Do not allow the perfect to become the enemy of the good,'" they wrote on Dec. 30.

In 2009, Detroit pledged a critical revenue source, casino taxes, as collateral to avoid defaulting on pension debt payments. That agreement allowed the city to get fixed interest rates on bonds with UBS and Bank of America. But it backfired when rates dropped during the recession.

Detroit had lined up a loan to pay for the settlement.

Earlier Thursday, Gov. Rick Snyder met with Michigan lawmakers to discuss the possibility of contributing state money to shore up Detroit's pension plans and prevent the sale of city-owned art, days after foundations committed $330 million to the effort.

The Republican governor spoke with the senators behind closed doors and may soon ask the GOP-controlled Legislature to match the foundations' contribution over a number of years, possibly in his February budget proposal but not during his State of the State speech Thursday night. Senate Majority Leader Randy Richardville confirmed the talks about state involvement but said no final plan or request has been made to legislators, nor have they made any commitments.

He said he was "cautiously optimistic," however, that a solution "will come forth sometime in the near future."

"Detroit is hugely important to everybody in this state," Richardville said.

National and local foundations are committed to providing $330 million to prevent the sale of city-owned art at the Detroit Institute of Arts and soften cuts to pensions of Detroit retirees.

Emergency manager Kevyn Orr, who runs Detroit, says two pension funds are underfunded by $3.5 billion. A deal involving the state and foundations would help retirees but probably wouldn't alleviate all their pain in the final plan to fix $18 billion in long-term debt.