The agency that supplies water to most of Southern California has paid tens of millions of dollars since 2008 to exit risky and complex financial deals it made before the Great Recession hit.

The Metropolitan Water District of Southern California entered two dozen interest-rate swap deals, which, in a convoluted way, aimed to stabilize debt interest rates, but amount to bets on the way interest rates will go. If interest rates move one direction, the swap becomes an asset. If they move the other direction, it becomes a liability.

Metropolitan, a powerful Los Angeles-based agency that provides water to 19 million people across Southern California, paid nearly $88 million to exit interest-rate swap deals, and still has a $71.5 million swap liability on the books, records obtained through the California Public Records Act show.

Such payouts and the liability that remains show Metropolitan got the raw end of the deals and lost. Neither would have existed if interest rates had gone up, instead of down.

As part of a review of local public agencies that did swaps, Metropolitan’s swaps stood out because leaders there invested more heavily in them than the rest – tying nearly $2 billion in debt to swap contracts – and paid a heftier price for doing so when it wanted out of the losing deals.

Government officials’ appetite and tolerance for such risk-taking with public money has waned in recent years, but much of the damage was already done.

Since the Great Recession, swaps have cost public and private entities billions of dollars to exit. Unlike most traditional government debt, swap contracts typically cannot be renegotiated or refinanced. To get out, the losing side must pay the winning side the fair market value of the swap contract, which can be steep if terminated decades before it expires.

Even though the swap payouts weren’t part of the plan, Metropolitan officials say the swaps have been beneficial, and spending millions of dollars to get out of several of them early was the smart, cost-effective thing to do long-term.

“You unwound the swap for economic savings,” said Gary Breaux, Metropolitan’s chief financial officer and assistant general manager, referring to the termination payments.

Breaux said swaps were done by government agencies with good intentions, “always as a way to lower the interest rate. I wasn’t taking a bet on the movement of interest rates.” Still, he acknowledges, “It hasn’t worked out for everyone.”

Though swaps have largely disappeared from the public sector, governments far and wide signed risky swap deals with Wall Street over the years. Financial advisers often emphasized what could go right, instead of what could go wrong.

“You are betting with public money,” Lisa Washburn, managing director for the Massachusetts firm Municipal Market Analytics, who formerly worked at Moody’s Investors Service, told Voice of San Diego in June. “As long as the swap liability persists, it’s continued evidence of the bad bet they made before.”

When interest rates fell in the market crash and stayed low, huge liabilities quickly appeared on government balance sheets. Some swaps remain, while some agencies cut large checks to get out of the losing bets.

In a swap, agencies that borrow money, like Metropolitan, pay back lenders with interest. They also, however, separately agree to trade additional interest payments with a bank. Metropolitan pays a fixed interest rate in the swap in exchange for a variable rate payment, while also paying a variable interest rate to real bondholders. The variable rates coming in and going out are supposed to cancel out, leaving an attractive fixed-rate payment to the banks in the swap that’s lower than the issuer could have obtained in the bond market outright.

Holding onto losing swap deals often means continuing to make swap payments to banks that the agency doesn’t even owe money to. And those payments can dwarf payments to actual bondholders, and are higher than current market rates. It also means contending with a liability that may tie up millions of dollars that could otherwise be spent elsewhere.

The San Diego Association of Governments still has a roughly $100 million liability on the books thanks to its 2005 swap bets. The regional planning agency spent $22 million in 2012 to get out of a portion of its swaps using borrowed money that will end up costing $42.5 million to repay.

San Diego County and the San Diego Metropolitan Transit District used operating funds to get rid of their swaps several years ago, paying $22 million and $3.24 million, respectively.

Records show Metropolitan paid $87.6 million to Wall Street banks from 2008 to 2014 to terminate some of its swaps.

The largest payouts went to JPMorgan, Deutsche Bank and Morgan Stanley, at more than $20 million each. Metropolitan also paid millions to AIG, Goldman Sachs and Citigroup to end swaps. In each case, the swaps were ended at the same time new debt was issued to refund old debt.

Metropolitan – like SANDAG – used the new borrowed money to pay the swap termination fees, which means the terminations will cost more when interest is factored in. According to public bond documents, past swap terminations will ultimately cost the water agency somewhere between $92 million and $122 million.

To put that in perspective, that’s at least 10 times the amount Metropolitan budgeted in its multiyear capital investment plan for assessing dam safety and making some dam monitoring system upgrades.

The swap payouts equal 5.6 to 7.5 percent of the agency’s $1.65 billion budget last fiscal year. Nearly all of the agency’s revenues come from water sales.

Despite the swap termination costs, a staff presentation made to the agency’s finance committee on Oct. 13, 2014, listed the benefits of terminating the swaps, including that it would “mitigate and eliminate various risks,” and lessen the need for Metropolitan to post collateral, which reached $37 million in June 2012.

Metropolitan’s eight remaining swaps were worth negative $71.5 million as of June 30, officials said. Records show the swaps have been in the red for 14 of the last 16 years.

Not all swap terminations cost money for Metropolitan.

Records show the agency received $4.8 million combined from UBS, Bear Stearns, Goldman Sachs, Morgan Stanley and JPMorgan when certain swaps were terminated in 2007 and early 2008.

Over the years, Metropolitan entered more than 20 interest rate swaps tied to nearly $2 billion worth of water revenue bond debt. Officials say they’re happy with the way things turned out, payouts and all.

“In every instance, they (swaps) were entered into to lower our overall interest cost for our borrowing,” said Breaux, the chief financial officer. When comparing swap interest rates with fixed rates available outright, Breaux said swaps were 1 percent lower or more, which leaders “felt to be sufficient savings to offset any of the risk that are inherent in swaps.”

When Metropolitan did cut large checks to terminate swaps in 2008, 2012 and 2014, it did so only when new bond debt would replace old debt and lower overall debt payments with the swap termination fees factored in.

“In effect, it didn’t really cost us anything. We just restructured the (debt) payment. Debt actually went down a little bit. I don’t think it had any impact on our ability to finance projects,” said Breaux. “Not doing the transaction would have cost us money.”

That’s true, in part, because interest rates didn’t rise as anticipated and new market conditions offered lower rates. But doing swaps tied the agency’s hands to costly payouts that would not have existed with a normal debt refunding.

Breaux didn’t rule out entering more swaps in the future, though there are no plans to do so. For now, officials plan to leave their remaining eight swaps, tied to nearly $500 million in bonds, in effect until they expire five to 10 years from now. Bonds with swaps currently make up 11 percent of all the agency’s debt.