After the biggest rally in U.S. local bonds in more than a decade, investors should prepare for the first year of losses since 2008, analysts at Morgan Stanley and Municipal Market Advisors predict.

The $3.7 trillion muni market has earned about 20 percent since the start of 2011, the best two-year run since 2001, Bank of America Merrill Lynch data show. The gains have been spurred by bets that taxes will rise and by the Federal Reserve’s move to increase holdings of longer-dated Treasuries.

While tax-exempt yields are the lowest since the 1960s, interest rates on Treasuries will probably rise next year, according to data compiled by Bloomberg. Yields on 10-year federal obligations will rise to 2.23 percent by the end of 2013, from about 1.59 percent yesterday, according to the median response of 70 analysts in a Bloomberg survey.

“The margin for error is so thin,” said Michael Zezas, Morgan Stanley’s head muni strategist, who correctly predicted in January that tax-free revenue debt would beat state and local general obligations this year. “With yields being at the historical lows they’re at, it only takes a small move higher in those yields before you realize negative returns.”

Shrinking Buffer

The muni rally has left investors with an insufficient cushion against rising Treasury interest rates, said Zezas. At current levels, a yield jump of as little as 0.18 percentage point in munis would outweigh interest income and produce losses for the next 12 months, said Zezas. His company is the fourth- biggest lead underwriter of muni deals this year, data compiled by Bloomberg show.

State and city debt has gained this year as defaults are set to be the lowest since at least 2009, contrary to a prediction two years ago by banking analyst Meredith Whitney that failures would escalate. The rally has accelerated since last month’s re-election of President Barack Obama, who wants to raise tax rates on top earners to help reduce the U.S. deficit.

Yields on 20-year general obligations fell last week to 3.29 percent, the lowest since September 1965, according to a Bond Buyer index. In January 2011 the interest rate reached 5.41 percent after Whitney’s default forecast.

Zezas expects a negative 1 percent total return in 2013. The muni market has gained for four straight years.

‘Less Believable’

“It’s possible we could continue to rally, but that idea is becoming much less believable,” Matt Fabian, a managing director at Concord, Massachusetts-based Municipal Market Advisors, said this week. “That we have broken through these levels is remarkable.”

Fabian correctly predicted at the start of the year that muni yields could extend declines from near four-decade lows at the time because of slowing defaults and increased refunding.

Investors have added about $49 billion to muni mutual funds this year, the most since 2009, Lipper US Fund Flows data show. That includes $4.6 billion in the past four weeks, fueled by bets that Obama will increase the top federal income-tax rate to 39.6 percent from 35 percent.

Based on potential tax increases, Janney Montgomery Scott predicts munis have room to outpace Treasuries again in 2013. Tax-exempts have earned 9 percent this year, compared with 2.7 percent for Treasuries.

Yields on benchmark 10-year munis fell to 1.4 percent yesterday, the lowest for a Bloomberg Valuation index that began in January 2009. The interest rate on similar-maturity Treasuries touched a record-low 1.379 percent in July.

Lowest Yield

The lowest forecast in the Bloomberg survey was for a 10- year Treasury yield of 1.5 percent at the end of next year.

“We’ve been hit over the head for about 12 years now about how rates have to go up from here, and they’ve done nothing but go down,” said Rafael Costas, co-director of munis at San Mateo, California-based Franklin Advisers Inc., which manages about $85 billion in local debt.

Still, “it’s hard to make an overly bullish case from where we are now,” he said.

As munis outpaced Treasuries in the past month, the ratio of 10-year local yields to those on federal securities sank to about 86 percent last month, the lowest in more than a year, signaling munis were relatively expensive.

Ten-year Treasury yields may rise to 2.25 percent next year, Zezas forecasts, in line with the median in the Bloomberg survey. For munis to avoid negative total returns in that scenario, the ratio would have to fall to 74 percent, according to Zezas. That would be unprecedented, according to a Bloomberg index beginning in 2001.

“We can’t envision a scenario in which muni yields would hold while U.S. Treasury yields moved that much higher,” he said. “You’d be looking at muni-Treasury ratios that historically have not been observed.”

Following is a pending sale:

CONNECTICUT plans to sell $625 million in special tax- revenue bonds as soon as next week, according to data compiled by Bloomberg. The debt will be used to fund transportation infrastructure. (Added Dec. 6)