The welcome announcement that Jefferson County, Alabama, may finally be getting out from under the bankruptcy cloud that has hung overhead for 18 months was paired with the news that JPMorgan Chase (NYSE:JPM) may lose up to $1.6 billion on the deal. How can this be?

Part of the reason is that the big bank has agreed to forgive $842 million of the debt Jefferson County still owes from the financing arrangement made years ago on the county's new sewer system. The other part is the $722 million that JPMorgan paid the Securities and Exchange Commission in 2009 to settle corruption charges tied to that transaction -- which resulted in the single most expensive municipal bankruptcy in this nation's history.

An incredible tale of greed and corruption -- really

The story of Jefferson County's demise began in 1996 with a federal judge's decree that the county fix its antiquated sewer system, which was polluting nearby waterways. As Matt Taibbi reports, instead of stopping at needed repairs, county commissioners signed on to build a state-of-the-art sewer system that would prevent future overflows.

This project needed financing, and the original price tag of $250 million ballooned to $3 billion once the graft settled in. Sleazy county officials and contractors all took their slice of the pie, the payments on which soon began to outpace the most rapid of sewer rate increases. Enter Wall Street, anxious to help the country folk restructure their debt for the good of the political and financial machines.

JPMorgan rode in, changing the sewer debt bonds from fixed to adjustable rate, then pushed officials into synthetic rate swaps, which would ostensibly keep the county's payments to the bank fixed, while JPMorgan took on the risk -- for a fee -- of paying the bondholders. Nice work for the bank, which took in astronomical fees, all the while paying bribes to county politicians in order to keep the well-oiled machine humming. JPMorgan got so used to the easy money that it even forked over a $3 million bribe to Goldman Sachs (NYSE:GS), which was also expressing interest in the ongoing shenanigans, in order to convince the other bank to leave this particular golden goose alone.

Of course, when the financial crisis hit, the whole thing fell apart, leaving Jefferson County holding the entire bag, and on the verge of bankruptcy.

A free-for-all for big bankers

JPMorgan and Goldman weren't the only banks involved in these kinds of scams. In late 2010, Bank of America (NYSE:BAC) paid $137 million to settle with the SEC regarding bid rigging on 88 municipal bond contracts between 1997 and 2002. The next year, Wells Fargo (NYSE:WFC) ponied up $148 million to put to rest charges that its acquisition, Wachovia, rigged 58 muni bids over an eight-year period.

But, for the enormity of the fraud, and the immense harm that it caused, JPMorgan's sewer bond swindle takes the cake. Of course, the bank could never have brought the whole thing off without the willingness of a cadre of southern charlatans, but some of those lost their jobs, at least, while others went to jail. JPMorgan didn't even see a dent in its municipal bond-floating business. Meantime, the residents of Jefferson County are left to clean up the mess.

So, does JPMorgan deserve to take an $850 million haircut, on top of the fines it has already paid to the SEC, for its responsibility in this debacle? Certainly, it seems the very least it can do.