ST. PETERSBURG — The city needs a lot of money — $435 million over the next five years — most of it to fix its leaky sewer pipes and aging sewer plants.

Without that cash, St. Petersburg could face steep fines for violating a soon-to-be-finalized consent order with the state forcing the city to fix its sewage problems.

But the huge price tag comes with financial repercussions: It would effectively double St. Petersburg's overall utility debt, threatening the city's utility bond rating — which is used as a measure of a municipality's credit-worthiness.

That revelation appeared to surprise the St. Petersburg City Council on Thursday.

Then the council learned of a Hail Mary plan to try to raise the funds without endangering the city's credit: An obscure state law passed in 2016 allows cities and counties to band together to form an independent bonding authority that would issue a "utility cost containment bond."

Those bonds wouldn't be paid back by the city, but by residents directly to the bonding authority from a charge levied to consumers' monthly bill.

Finance director Anne Fritz and a consultant laid out the plan, which she said has been done in California but has never been implemented in Florida. Such a solution would preserve the city's utility bond rating — currently a respectable Aa2 — and prevent higher interest rates, which would otherwise be passed along to residents.

"We want to do anything we can to protect our ratepayers," Fritz said after the meeting, where the council discussed the budget of the beleaguered Water Resources Department, which is at the heart of St. Petersburg's 2-year, 200-million gallon sewage crisis.

Protecting the city's bond rating will save taxpayers some money on lower interest rates, council member Karl Nurse said, but it also functions to keep it off the city's books, giving the appearance of a healthier financial bottom line for the city.

"I'm not instinctively in favor of something so complicated that is essentially a maneuver to avoid having the $400 million that we will owe showing up on our debt load," Nurse said.

Nurse compared it to private sector companies that lease equipment as a way to disguise the capital costs of purchasing it: "It's really an effort to hide that debt."

Fritz said the city hasn't talked with any other cities or counties yet to see if there is any interest in joining forces with St. Petersburg to form this bonding authority.

"It's very, very preliminary," she said.

But plenty of Florida utilities should be interested, she said.

"Believe me, we are not unique," Fritz said of the city's ballooning debt burden.

The bonding authority would likely get a AAA bond rating because of it structure, she said, which would save taxpayer money through reduced interest rates.

One possible path to salvation? The Penny for Pinellas.

If voters approve the next decade of the county's 1-cent sales tax in November, the city would have a big chunk of that debt reduced thanks to revenues generated by the city's share.

"Part of what makes this obviously complicated is a $90 million question mark with the Penny," Nurse said.

That's why the city won't approach bonding agencies this year. There's too much uncertainty surrounding such a large bonding request, the pending state consent order to worry about and the Penny vote. That makes taking out a $120 million bank loan the preferable option for the upcoming fiscal year, said City Administrator Gary Cornwell, which starts Oct. 1.

"It's essentially a bridge loan," Cornwell said.

The hope is that the bank loan will give the city a year to set up the bonding authority, which has to be approved by the City Council and the decisionmakers for whichever other municipalities join in — assuming any do so.

Fritz said it's uncharted territory: "Nobody has done it yet."

Contact Charlie Frago at cfrago@tampabay.com or (727) 893-8459. Follow@CharlieFrago.