America’s states are increasing their spending at the fastest pace since the end of the Great Recession.

Their budgets swelled by 5.9% in the 2019 fiscal year to about $2.1 trillion, the biggest annual increase since the recession ended in 2009, according to a report Thursday by the National Association of State Budget Officers. That’s up from a 3.7% pace in the year before as state officials pumped more money into transportation projects, pensions and reserves that will help them weather the next economic rout.

The figures show how the record-long expansion is reviving the finances of states that were hit hard by the fallout from the real estate bust. That shift has lifted the credit ratings of California, Washington and Michigan and driven down the yield penalties that investors demand to buy bonds of states such as Connecticut and Illinois.

The jump in spending was spurred by “strong gains” in tax collections over the past two years, the budget officers group said. Eighteen states increased transportation spending by at least 10% in the 2019 year, chipping away at a backlog of deferred maintenance that the Volcker Alliance estimates to stand at $873 billion.

The possibility of another recession and uncertainty cast by the 2020 presidential election may spur states to continue stepping up their spending on transportation projects early next year in case the outlook changes, said Karel Citroen, head of municipal research at Conning, which manages about $6.8 billion in municipal bonds.

“This is their now or never moment,” Citroen said. “This is going to be the final opportunity to take care of their infrastructure needs.“

During the next fiscal year, which begins in July for most states, spending growth will likely decelerate as governments gird for the potential of a slowing economy and project smaller increases in revenue, said Brian Sigritz, director of state fiscal studies at the budget officers group. California’s legislative research arm on Wednesday estimated slower revenue growth in the year beginning in July.

To prepare, many states are salting some of their surpluses away: Thirty two states have proposed increases to rainy-day funds, Sigritz said. And they have remained hesitant to borrow money, with the amount of state and local debt less than it was in 2010. That’s likely a wise decision, given how vast the budget shortfalls were during the last slowdown.

"The big lesson for the past decade or so is that fiscal restraint gets rewarded when times are lean,” said Dora Lee, vice president at Belle Haven Investments, which manages about $10.6 billion of municipal bonds.

This article was provided by Bloomberg News.