The $3.7 trillion municipal-bond market is poised to extend its biggest rally in 21 months as slowing withdrawals from mutual funds and dwindling supply defy October’s history as the worst period for total returns.

As benchmark yields fell in September at the fastest pace since 2011, individual investors’ exodus from mutual funds focusing on local debt has diminished. They’re owning munis even though the securities have lost 0.2 percent on average in October since 2000, the worst performance of any month, Bank of America Merrill Lynch data show.

This year has already defied historical trends, said Chris Alwine at Vanguard Group Inc. Municipal bonds declined in both July and August for just the second time since 1989 after Federal Reserve Chairman Ben S. Bernanke said the central bank may curb its bond buying. Bernanke unexpectedly decided last month to hold off on tapering the monthly purchases of Treasuries and mortgage securities.

“The seasonal patterns as of late have not been following through,” said Alwine, head of munis at Valley Forge, Pennsylvania-based Vanguard, which oversees about $127 billion in local debt. “The tapering talk that started in May and intensified in June threw that off. Now we’ve had a complete reversal.”

Supply Slowdown

Local-government bonds gained 2.3 percent last month through Sept. 27, halting four straight months of declines and outpacing Treasuries and corporate securities. In addition to Bernanke’s decision, munis were buoyed by the slowest issuance month since January 2012.

Municipalities sold $17 billion last month as interest rates touched the highest since April 2011, data compiled by Bloomberg show. The borrowing slowdown is continuing even after yields fell the past three weeks. States and cities are set to sell $3.6 billion of bonds this week, the least for a non- holiday period since July.

At the same time, investors are unloading local debt at a slower pace. Individuals pulled $159 million from muni mutual funds last week, the smallest withdrawal since May, Lipper US Fund Flows data show.

“If we maintain this manageable level of supply and the fund-flow trend continues the way it has been going the last several weeks, we should be shaping up for a reasonably good October,” said Chris Mauro, head of municipal strategy at RBC Capital Markets in New York.

Beating Treasuries

The latest gains also show that the municipal market was punished broadly in the days after Detroit’s record bankruptcy filing, said Gene Gard, who oversees $1.3 billion of munis at Dupree & Co. in Lexington, Kentucky.

The ratio of benchmark 10-year local-debt yields to the interest rate on Treasuries reached about 115 percent in August, the month after Michigan’s most-populous city sought court protection. That was the highest since June, indicating munis were cheap relative to their federal counterparts.

The ratio has since tumbled to about 103 percent. The lower the figure, the more expensive munis are compared with federal debt.

The gain for munis last month compared with a return of about 0.8 percent for Treasuries through Sept. 27, the biggest local-debt outperformance since January, Bank of America data show.

“We’ve had a strong rally off of cheap levels and light supply,” Alwine said. Munis are still “vulnerable to a reversal” if localities ramp up borrowing after the decline in interest rates, he said.

October Outlook

States and cities have scaled back offerings to refinance debt in 2013 by the most in seven years, forgoing the chance to achieve debt-service savings.

Municipal issuers have scheduled about $6.5 billion in sales over the next 30 days, compared with an average visible supply of $9.5 billion over the past year, data compiled by Bloomberg show. History suggests the pace will increase -- October volume has been higher than September’s every year since 2006, the data show.

Last month’s gains shrank third-quarter losses to about 0.4 percent. It still marked the first back-to-back quarterly declines in local debt since 2008. Munis have dropped 3.3 percent in 2013, on pace for the worst return in five years.

“October isn’t a friendly month for munis typically, but at this point we know it’s coming,” said Chip Peebles, head of retail trading at Raymond James & Associates in Memphis, Tennessee. “We’ve seen demand increase with retail, and there aren’t a lot of bonds around. It might be less volatile.”

O’Hare Offering

Chicago plans to issue $899 million of bonds for O’Hare International Airport in this week’s biggest offering, Bloomberg data show. Connecticut is set to borrow $575 million to help plug a general-fund deficit.

Localities are borrowing as top-rated 10-year munis yield 2.7 percent, near the lowest since June. The interest rate compares with 2.61 percent for similar-maturity Treasuries.