If a recession comes soon, America’s state governments are better prepared than ever.

With most states seeing tax collections rise at a faster-than-expected pace, governments have been setting aside more money to help them avert deep spending cuts the next time the economy contracts. Those so-called rainy-day funds have swelled to about $68.2 billion, with the median state having enough to cover about 7.5% of its annual budget, the most on record, according to a report released Thursday by the National Association of State Budget Officers. Next year, those reserves are expected to grow to $74.7 billion.

The financial improvements have been lauded on Wall Street, where investors have been demanding smaller yield penalties from some states that were hard hit by the last recession as money floods into the $3.8 trillion municipal-debt market.

Pennsylvania this week sold $900 million in general-obligation bonds for yields as low as 0.04 percentage points over benchmark, 1/10th the premium it paid a year ago. Illinois and Connecticut have also seen those spreads decline.

“It’s a borrowers market and the financial performance and improved credit quality from reserves, etc., is being taken advantage of when they borrow,” said Adam Buchanan, senior vice president of municipal sales and trading at Ziegler Capital Markets Group in Chicago. “It’s twofold: credit quality improving and the municipal market has been very issuer-friendly.”

State governments were hit hard by the last recession, which left governors and legislatures dealing with big budget shortfalls for years. While the economy is continuing with a 10-year economic expansion, there’s growing speculation that the nation may be poised for another slowdown, with many economists surveyed by Bloomberg anticipating a recession next year.

So far in the current budget year, however, more than half of U.S. states reported that tax revenue was higher than expected, a figure that’s expected to grow after all the April receipts are accounted for, according to the budget officers group.

This could bode well for borrowers beyond states. It tends to trickle down to local government credit performance too, said Eric Friedland, director of municipal research at Lord Abbett & Co., which oversees about $23 billion in munis. States have more “dry powder” to confront any declines in revenue, he said.

“Municipal mangers are behaving more prudently in this economic expansion” compared to prior ones, Friedland said. “We feel that the states are better positioned for a potential recession than they have been before.”

This article was provided by Bloomberg News.