Scandals in New Jersey aren’t confined to bridge lane closings or politicians getting caught in videos agreeing to take pathetically small bribes. Let me show you a different kind of Jersey scandal–something that has been blessed by lawyers and advisers and is totally legal. But totally wrong for the state.

Why am I, a New Jersey resident who owns state bonds, sharing my Garden State grievance with you?

Part of it has to do with being disillusioned with Gov. Chris Christie, whom I embraced as a fiscal conservative, but who hasn’t acted that way–and whose administration has just done a deal it proclaims a fiscal winner but that looks like a loser to me.

However, my major motive here is that other governments will likely be doing what Jersey did in March: restructure financially distressed tobacco bonds. Bloomberg lists 24 issuers (20 states, the District of Columbia, and three territories) with a total of $38 billion of tobacco bonds, about 20% of which are distressed. Keep your eyes on those re-fis.

Tobacco bonds are revenue bonds backed by payments that governments get under the 1998 master settlement with tobacco companies like Altria MO and RJR RAI . Payments are below projections because the manufacturers’ U.S. sales have suffered, for numerous reasons.

As a result, the 76% of its tobacco-settlement revenue that New Jersey pledged to the $3.6 billion of bonds that it issued in 2007 no longer covered the interest and principal payments. The other 24% of tobacco revenues, about $60 million a year, went to the state’s general fund.

SLO.06.30.14.-graph-Source: New Jersey Office of Public Finance

In Jersey’s case–and in most if not all the 23 others–the issuer has no legal or moral obligation to pay tobacco bonds. That’s why the two lowest classes of Jersey tobacco bonds–1-B and 1-C–traded at depressed levels for years. These bonds, originally rated investment grade, tumbled deep into junk territory. These are zero-coupon bonds that pay no cash interest, and their holders weren’t going to get a penny until the $3.4 billion of bonds ranked ahead of them were paid in full.

Last year, the state treasury told me, Barclays approached it about restoring the two wheezing bonds to health while also maximizing cash for the state. After examining proposals from five other firms, the state hired Barclays BCS , a leading tobacco bond house. Like every player but the treasury, which sent me scads of data, Barclays declined to comment. So I’ve based this account primarily on my interpretation of public records.

Once Barclays was on board, the fun began. Three sophisticated investors controlled most of the troubled Jersey bonds. One, an $8.4 billion hedge fund called Claren Road, whose management company is 55% owned by Carlyle Group CG , had bought up the majority of the less-troubled 1-B issue in the market. Claren Road also had some walking-dead 1-C bonds.

About 75% of the 1-C’s were owned by Goldman Sachs GS and Oppenheimer mutual funds, which, judging from public records, bought them at original issue in 2007 and sold them in the first quarter of this year, taking steep losses.

After months of negotiations, Barclays arranged for the state to buy in most of the 1-B’s and 1-C’s at above-market prices. The state paid about 16% of face value for the 1-B’s, and about 9% for the 1-C’s, which, according to the Municipal Securities Rulemaking Board’s EMMA database, had been trading at about 12 and 5 to 6, respectively,.

The state then committed its 24% of tobacco payments to back the 1-B’s and 1-C’s, and sold those now-identical, A-rated securities to Claren Road and others for about 22% of face value, some $96.5 million more than it paid for them. After fees–primarily $4.47 million to Barclays (for doing a deal that I consider imaginative and smart, even though I dislike it) and $266,000 to Standard & Poor’s for re-rating the bonds–the state netted $91.6 million, a welcome budget windfall.

The big winner seems to be Claren Road, which had apparently accumulated its 1-B position over several years at a cost well below the 16 or so the state paid. After buying back the enhanced bonds from the state at about 22, Claren unloaded its holdings at about 24, a nifty extra profit.

It will take about seven years for the 24% of tobacco revenue to pay off the 1-B’s and 1-C’s, after which the $60 million a year will flow back to the state’s general fund.

The state hails this enhancement deal as a triumph because it got upfront money, and will also be able to pay off its other tobacco bonds by 2041 rather than 20 or 30 years later. That will allow the 76% of tobacco payments devoted to those bonds to flow to the general fund decades earlier than projected. The state values its overall benefit from this deal at $45.1 million in current dollars on top of the $91.6 million that it got.

So what’s my problem? I think the state made a bad deal for everyone but tobacco bondholders and the people trying to balance its 2014 budget. The state is diverting $420 million–$60 million a year for seven years–from the general fund to the 1-B and 1-C bonds in return for $91.6 million today and something 27 years down the road. Maybe.

I think taxpayers would be better off had the state kept the cash to help its troubled pension funds or to pay for services or to pay its non-tobacco bonds, including the transportation issues that I own.

Why did the state bail out the 1-B’s and 1-C’s, for which it had no legal or even moral obligation? “We respectfully disagree” with the argument that there’s no need to help those issues, treasury spokesman Chris Santarelli said in an email. “The state sees an advantage in maintaining good relations with the tobacco bond investors as they are likely to invest in other bonds of the state.”

Nevertheless, my bottom line remains as follows: I think the state’s blowing smoke. This is a brilliant deal–but the state shouldn’t have made it.

End note: I voted for Chris Christie twice, but I’m now on the lookout for gridlock-creating lane closures near my house.

Additional reporting by Marty Jones

A shorter version of this story appeared in the June 30, 2014 issue of  Fortune.