Mayor Rahm Emanuel will still need to ride to the rescue to prevent Chicago Public Schools from closing three weeks early — even if Friday’s ruling by a Circuit Court judge amounts to a total victory for the nearly bankrupt school system.

And that is a risky proposition for a mayor who has spent the last six years attempting to shore up Chicago’s own shaky finances and prevent CPS financial woes from dragging the city under.

What Emanuel has called a “firewall” between city and school finances would have to come down — at least temporarily — in the form of a bridge loan from the city’s tax-increment financing funds or a combination of a loan and yet another round of painful school budget cuts.

“In a system that doesn’t have the money to run regularly, where do you think they’re gonna get the money to pay that loan back? You can call it a bridge loan. But those things tend to end up in default,” said Ald. Pat O’Connor (40th), the longtime chairman of the City Council’s Education Committee now serving as Emanuel’s floor leader.

“We have our own individual bond ratings, but they’re often seen as inextricable. We can’t afford to be seen as hurting our rating further, because then our ability to borrow and pay and do things is limited and gone,” he said.

ANALYSIS

Civic Federation President Laurence Msall said Emanuel has no good options after signing off on a school budget that assumed $215 million in state pension help. Rauner subsequently vetoed the teacher pension bill because his condition of having state pension reform was not met. CPS had no “Plan B,” as Msall put it.

“The mayor needs to be very careful that the $200 million to $400 million necessary to keep the Chicago Public Schools going does not come at the expense of further downgrade [in bond rating] or further instability for the city of Chicago. The city does not have reserves adequate to absorb that without jeopardizing its own credit worthiness,” Msall said.

Even a “bridge loan” would be problematic, Msall said, adding: “From what assets would they repay the loan and not jeopardize the opening of schools next year vs. the early closing this year?”

Judge Franklin Valderrama has scheduled a ruling for 2:30 p.m. Friday on the request by CPS for a preliminary injunction against the state and on the state’s motion to have the whole case tossed.

CEO Forrest Claypool, who’s championed the lawsuit as lawmakers stall, has said parents will learn of the district’s plans after the judge’s ruling but wouldn’t clarify how soon afterward.

“With a ruling expected this Friday in our civil rights lawsuit against Gov. Rauner and the state of Illinois, this could be a critical week for the future of our schools,” he told the school board this week.

CPS wants to know if, as Claypool put it, “immediate action can be taken against the state’s racially discriminatory school funding system.”

But the “immediate action” CPS wants would halt all state payments to school districts, including Chicago, until a non-discriminatory way of distributing that money can be determined.

The judge has told attorneys he has no power to tell state legislators how to dole the money out.

CPS didn’t immediately respond to messages seeking comment on Thursday. But even if CPS scores a legal knockout Friday, a financial rescue can’t possibly come in time to stave off the early closing date of June 1 that Chicago Public Schools has threatened.

For one thing, Rauner could appeal an adverse ruling. His office declined to say for sure on Thursday, or to answer other questions. A spokeswoman sent a repeat of a prepared response telling CPS to “urge legislators to pass a balanced budget that includes school funding reforms that will better meet the needs of every student.” ​

And even if he doesn’t appeal, a rewrite of the school funding formula that has eluded the state lawmakers for decades won’t be easy or quick, particularly not as the state budget stalemate drags on.

That means if Emanuel hopes to preserve the longer school year that he endured a teachers strike to achieve, he will have no choice but to roll the dice and rescue CPS.

And the Chicago Teachers Union, which nearly walked out on May 1 in anger over four unpaid furlough days, has raised the specter of striking again if any more paid work days get cut.

The most likely source of a temporary bridge loan is TIF funds. The mayor has already used an $87.5 million TIF surplus to stave off another teachers strike. He could ask the City Council to declare another temporary surplus and hope the money would be paid back when a long-term solution is reached.

Emanuel is far more likely to borrow from TIF than he is agree to a long-stalled ordinance that would send surplus TIF money to CPS automatically in any year when the school system is in financial distress. That approach, outlined in a long-stalled ordinance, would siphon more from infrastructure funding than Emanuel wants.

A bridge loan from the $620 million in “asset reserves” that remain from the sale of the Chicago Skyway is equally unlikely. That’s because Emanuel has taken great pains to replenish the city’s “rainy day fund” that had been drained by former Mayor Richard M. Daley so Daley could avoid raising property taxes.

“The city cannot afford to draw down its own reserves — whether from the Skyway or others — to prop up the Chicago Public Schools for the rest of the year because they have inadequate reserves and inadequate contingencies should there be any hiccup from the state or any hiccup in terms of their own revenue,” Msall said.

Equally unlikely is anything short of a full $720 million payment due to the Chicago Teachers Pension Fund on June 30.

Two years ago, the Emanuel administration asked the teachers pension fund for a five-month, $500 million loan, despite the history of pension holidays and partial payments that created the CPS pension crisis.

The pension fund said “no” and likely would again.

“It’s asking a lot and probably too much to say to teachers, ‘Pay yourselves out of the money that you’re gonna need when you retire,'” O’Connor said.

Msall agreed borrowing from the teachers pension fund would “further increase the unfunded liability and raise the long-term cost.”

“It points to the absolute need for CPS to come forward with a plan that will, long-term, stabilize the public schools rather than careening from crisis to crisis,” he said.

Even before the anticipated mayoral rescue to prevent an early end to the school year, the firewall Emanuel has tried to build between city and CPS finances was showing cracks.

Three months ago, Chicago sold $1.16 billion in general obligation bonds, but paid a heavy price for a school financial crisis made worse by Rauner’s veto.

The interest rate on nearly $900 million of those bonds ranged from 5.8 and 6.2 percent. If Chicago had a AAA bond rating, the interest rate paid on that money would have been about 3.3 to 3.5 percentage points lower.