It wasn't long ago that municipal bonds epitomized the fuddy-duddy end of the investing spectrum. Retirees, tax-averse orphans and coupon-clipping millionaires bought debt issued by states, cities, school districts and water authorities for stable, tax-free income. Because defaults were virtually unknown and many munis were insured against them, credit analysis was an afterthought.

Since the financial crisis struck two years ago, however, munis have come to symbolize something new--the perils of inattentive autopilot investing. Many muni owners, it turns out, had assumed significant credit risk for very meager returns.

With local finances a basket case and insurers rendered next to insolvent by mortgage-bond losses, the once-commoditized muni market was wracked by fears of default. In 2008 Jefferson County, Ala. defaulted on $3.5 billion in general obligation and sewer debt and the St. Louis Industrial Development Authority on $98 million borrowed to build a hotel. The suburban California town of Vallejo became a closely watched test case for how creditors would fare in the financial pecking order when it filed for municipal bankruptcy the same year. Then last summer the Golden State issued IOUs in place of tax refunds and left muni bond investors fearing that they could be next.

Such high jinks aside, muni bond fund managers are cautiously optimistic these days. They point out that despite the worst state and municipal financial climate since World War II, only a couple of big muni issuers have defaulted (Vallejo has continued in bankruptcy to pay revenue bondholders in full; general fund payments were briefly suspended and are now being made for less than the full interest owed.) Tax revenues are stabilizing, and many governments are finally getting a handle on expenses, points out Chris W. Alwine, who oversees Vanguard Group's municipal bond funds.

The bullish argument: Yields are in many cases well above their historical averages compared with Treasury yields. Aftertax returns on munis consistently beat those on Treasuries.

Historically, top-rated munis have yielded around 81% as much as Treasuries of similar maturities. (The munis are federally tax-exempt but Treasuries are not.) That spiked to 200% of Treasury yields during the worst of the financial crisis, in part because hedge funds and other institutions dumped their most liquid holdings to raise cash. Today five-year AAA-rated munis will yield you 1.6% (or maybe 1.4% if you live in a high-tax state and buy out-of-state munis). That compares with 2% pretax for five-year Treasuries, which will give you 1.2% aftertax next year if you are in the highest federal bracket. Treasuries are generally noncallable, so when rates go down you get to hang on to them. Not so with munis. But with interest rates low, the risk of having a muni called away is fairly small.

Further boosting munis' prospects is the growth of the federal government's Build America Bond program. With BABs financially strapped municipalities are encouraged to issue taxable debt and claim a federal rebate of one-third of their interest costs. The program has been a hit with municipal borrowers (and with pension funds buying the BABs), squeezing the supply of tax-free munis.

Another odd twist in the financial crisis has professional muni managers eschewing general obligation bonds, which are backed by the full faith and credit of the issuer. Douglas Gaylor, who oversees a $2.5 billion muni portfolio for Principal Financial Group ( PFG - news - people ), instead favors bonds backed by specific revenue streams, like sales taxes, sewers or electric utilities.

Gaylor says he can analyze the finances of a toll road or water company more easily than those of a state or city, with all their political and actuarial risks. Paper he favors: New York Municipal Water Finance Authority 5% bonds, maturing in 2031 and yielding 4%, and Illinois State sales tax bonds, due in 2034 and yielding 4.75%. The bonds are rated Aa2 and Aa3, respectively, by Moody's ( MCO - news - people ).

The murkier areas of the muni market offer even bigger potential. T. Rowe Price's funds have been big buyers of hospital-issued munis. Historically such deals have been hawked to rich seniors with a line that by supporting a pillar of the community they were doing good. The financial crisis has left such debt underpriced because few people have the expertise to decipher what the collateral is worth and who would end up with it in the event of default.

Areas that spook the experts: dirt bonds, tax-increment bonds and financings for senior citizen housing. Dirt bonds, issued to fund roads and utilities in property developments, have already cratered, producing hundreds of defaults and offering holders the unenticing prospect of complicated foreclosures on half-built McMansion communities. Fund vendor Eaton Vance ( EV - news - people ) dumped $3 million of defaulted Florida dirt bonds last year for less than 30 cents on the dollar. Tax-increment and senior-housing debt is likewise somewhat dependent on rising property values.

Interest rate risk and inflation are, of course, other dangers muni investors face. T. Rowe Price's funds are taking a barbell approach by mixing long-maturity bonds with short-term investments that can be rolled into higher-yielding paper if and when rates rise. Principal's managers aim down the middle by owning lots of 10- to 15-year maturities. AAA-rated 15-year general obligation bonds are yielding 3.8%; comparable Treasuries maturing in 2025 yield 3.9% and only 2.3% after tax.

For most individuals muni bond mutual funds are the way to go. Only if you have $1 million or so to devote to munis should you consider a portfolio of individual bonds, says Principal's Gaylor. The good news for do-it-yourselfers is that prospectuses are now available online, and discount brokers like Etrade and Charles Schwab ( SCHW - news - people ) provide hand-holding and transparent pricing. The one-way trading cost (commission plus half the bid/ask spread) on a $50,000 position will run anywhere from about 0.5% to 2%. Plan on holding to maturity.

Vanguard, T. Rowe Price and Fidelity Investments all offer low-cost funds that get high marks in our annual rankings. Vanguard's Intermediate-Term Tax-Exempt fund is yielding 2.9% after costs of 0.2% a year. Residents of California, New York and other high-tax states should consider double-tax-free funds. For those living in states that issue smaller amounts of munis, such as Arizona, Utah and Alabama, the local tax savings may not compensate for the slim pickings and lack of diversification.

#### Municipal Finance

Highly rated munis are yielding more than comparable Treasuries after taxes, and with supplies going down and taxes going up the market could rally. For muni portfolios of less than $1 million consider a low-cost fund, like those below.
Performance |  |  |  |  |  |  |
Up Mkt | Down Mkt | Fund | Total Return 5-Year Annualized | Yield | Assets 4/30/10 ($Mil) | Average Duration (Years) | Annual Expenses per $100 | Minimum Initial Investment
B | C | Fidelity Tax-Free Bond | 4.4% | 4.1% | $1,912 | 8.2 | $0.25 | $25,000
A | C | T Rowe Price Summit Muni Income | 4.3 | 4.3 | 477 | 6.4 | 0.50 | 25,000
B | C | USAA Tax-Ex Intermediate-Term | 4.0 | 4.4 | 2,899 | 5.5 | 0.45 | 3,000
C | B | Vanguard Intermediate Tax-Ex-Inv | 4.2 | 3.7 | 28,521 | 5.7 | 0.20 | 3,000
D | A | Vanguard Limited-Term Tax-Ex-Inv | 3.6 | 2.5 | 13,300 | 2.5 | 0.20 | 3,000
Performance through Apr. 30. Sources: Forbes; Lipper; Morningstar.