It's like a page out of the Brothers Grimm. Once upon a time -- and not so very long ago -- there were four giants. Their names were AMBAC, MBIA, FSA and FGIC. If those names don't sound very frightening to you, it's probably because these giants were insurance companies. They collected money from state and local governments that wanted to issue bonds, in exchange for a promise that the companies would bail out the governments should they prove unable to pay their IOUs to the investors. Since that rarely happened, the insurers raked in huge amounts of money and hardly ever had to give any of it away. It was a great deal for everyone. The insurance giants grew even fatter and happier, and the governments, backed by the insurers' guarantees, were able to borrow in the financial markets at lower rates than would have been possible any other way.

Then one day the giants got greedy. Or bored. Or thought they had a better idea. They expanded their business by insuring a much different financial instrument: collateralized securities tied to subprime mortgages on individual homes. The principle was essentially the same -- the insurance companies got paid handsomely to guarantee the mortgage debt against that rainy day when the borrowers couldn't meet their obligations. But the insurance giants seemed to forget that, while governments can raise taxes or scale back programs to stay solvent, homeowners don't have that option. They can't always scrape together money to pay their bills, especially if they lose their jobs or were unwise enough to sign a mortgage they couldn't afford.

This tale has a grim (or perhaps Grimm) ending. Not just for the bond insurers, who had to leave the business altogether, but for the municipal market as a whole. Bond insurance played a key role in making the market work. The insurers themselves had triple-A credit ratings. When they insured a bond, the government that issued it got the benefit of those high ratings. That was true for large states and localities and it was equally true for small agencies and tiny special districts -- the bond insurers leveled the playing field. "As long as everybody had a triple-A rating," says J. Ben Watkins, who heads up Florida's Division of Bond Finance, "everything traded freely." But not now. Without insurance, some issuers who don't merit triple-A status on their own have to scramble to borrow money at affordable rates. Some creative but less costly bonds are no longer available to any issuer, and some recently created markets have shut down altogether.

Prior to the meltdown, more than half of all municipal bonds were sold with bond insurance. "With insurance, those bonds had been relatively easy to sell," says Eric Johansen, debt manager for Portland, Oregon. "Now that they don't have that as an option, it's more of a challenge."

"We're back to the future," says Watkins. "We're doing business like we did 20 years ago, where credit matters and so does financial management."

One can scarcely overestimate the impact of the bond insurance meltdown on states and localities. Many of them, having purchased what they thought was iron-clad insurance protection, went beyond the conventional form of borrowing by issuing auction-rate or variable-rate debt. These bonds were keyed to short-term interest rates. The rates were reset at weekly auctions and were usually well below long-term rates -- that's what made them so attractive to state and local agencies that issued them. But in early 2008, the auction market collapsed just as investors began to worry about the financial health of the bond insurers who had guaranteed the debt. The collapse exposed governments to penalty rates of 12 percent or more -- a huge increase in costs at the worst possible time. Aurora, Colorado, faced a jump in interest rates on some of its debt from 3.5 percent all the way to 14 percent.

The collapse also exposed some issuers to demands that they repay the bonds sooner rather than later. In Texas, for example, Harris County's stadium bonds faced balloon payments on $117 million in variable-rate debt. The public authority that issued the bonds found itself obliged to pay off the debt in five years instead of 23 years.

In the period since the collapse, governments that issued variable-rate bonds have been trying to work their way out of the problem. Many have been able to refinance their debt as long-term fixed-rate bonds. Variable-rate bonds scarcely exist in the muni bond market any more. "Most issuers who would ordinarily go to variable-rate are going to fixed-rate now," Johansen says.

Watkins' finance office in Florida handles bond issuance for the whole state, from large, general obligation bonds to smaller deals for special districts. The general obligation bonds are still highly marketable. They have strong credit ratings and simple structures -- long-term, fixed-rate debt based on the full faith and credit of the state. But riskier public debt is another story.

Recently, for example, Florida International University, a public institution, offered a bond that, instead of the full faith and credit of the state, had to be covered by student fees. In the old days, the Bond Finance Division would have bought insurance for this type of bond and sold it competitively -- that is, it would have let investment banks or other underwriters bid to handle the issue, and would have awarded the deal to the lowest bidder. Instead, the Finance Division negotiated with the underwriters, something it would prefer not to do. It is generally conceded that negotiated deals, which long carried the stigma of corrupt "pay to play" politics, are still open to more opportunity for mischief than simple competitive bidding is. Nevertheless, as head of the division, Watkins is resigned to the change. "It's one of the ways we have adapted to the new world," he says.

Unusual as it may seem, through all this, the municipal bond market hasn't lacked for activity. In fact, this past November, state and local issuers floated more than $37 billion in debt, the third most active November in the market's history. The Bond Buyer reports that when the deals are counted up, 2009 will be a $400 billion year.

The action at the moment, however, isn't due to the market solving its long-term problems. Rather, investors, desperately seeking safety, are choosing muni bonds over other investments, and that's keeping interest rates low and making it easier for states and localities to issue debt. In particular, it helps issuers stuck with troubled variable-rate bonds to refinance at fixed rates.

But the bond insurance business, crucial to government issuers in the long run, is a shell of its former self. Currently, there are only two carriers writing policies, and they currently are providing insurance for fewer than 10 percent of the municipal bonds coming to market, a far cry from the days when half of the bonds issued were insured. Efforts are being undertaken to revive bond insurance, including a proposal by the National League of Cities that would create a publicly owned insurance entity.

"Looking back to the first quarter of 2008, when the auction-rate market and insurers went in the tank and everything ground to a halt, we're getting better slowly," Johansen says. "But we're not back to markets that are as robust as they were before all this happened."