State and local governments are in their best financial shape since the recession, giving them leeway to cushion the U.S. economy from federal budget cuts with spending and hiring of their own.

After slashing their workforces by about half a million in the past five years, state and local authorities will add employees in 2013, said Mark Zandi, chief economist at Moody’s Analytics Inc. in West Chester, Pennsylvania. Their payrolls in the fourth quarter will be 220,000 larger than in the same period for 2012, he projects.

Their expenditures and investment also will be higher, rising by 1.8 percent, triple the increase last year, according to projections by St. Louis-based Macroeconomic Advisers.

“The bloodletting on the state- and local-government level has finally passed through,” said Jim Diffley, chief U.S. regional economist for IHS Global Insight in Philadelphia. “They’re no longer subtracting from growth.”

The shift will help the U.S. weather the blow from federal tax increases and spending cuts, keeping the expansion on course, Zandi said. He forecasts that gross domestic product will climb 2.1 percent this year after rising 2.3 percent in 2012, with the expansion getting stronger as the year progresses.

States and municipalities, which accounted for 12 percent of GDP in 2011, won’t be a drag on growth this year for the first time since 2009, said Ben Herzon, a senior economist at Macroeconomic Advisers. The economic rebound means they’re collecting more taxes, reducing the need for more spending cuts.

Rising Revenue

State revenue will increase 3.9 percent during the 2012-2013 budget year to surpass the peak reached before the full effect of the 18-month recession took hold, according to a Dec. 14 report by the National Governors Association and the National Association of State Budget Officers.

Fifty-seven percent of cities said they were “better able to meet financial needs” in 2012 than in 2011, the first time a majority reported an improvement since the economic contraction that began in December 2007, a separate National League of Cities survey released Sept. 13 found.

The improvement in finances has helped allay concerns among investors about defaults in the tax-exempt municipal-bond market, where the securities have rallied in anticipation of higher taxes on the wealthy. The $3.7 trillion muni market returned 7.3 percent in 2012, compared with 2.2 percent for U.S. Treasury debt, according to Bank of America Merrill Lynch data. Last year was the fourth in a row for gains in total municipal- bond returns, the longest such stretch since 2007.