Germany's regional governments are set for another surplus in aggregate this year even as the central government posts a deficit and the economy takes a turn for the worse, the Bundesbank said on Friday.

While Germany struggles with soaring energy costs that have truncated its post-pandemic recovery, the picture for its 16 states is generally rosier, courtesy of higher taxes and robust federal help.

In aggregate, these so called Bundeslaender recorded a budget surplus of 5 billion euros ($4.87 billion) last year and are set for another surplus this year, the German central bank said in its monthly report.

Rhineland-Palatinate stood out last year thanks to higher revenues from locally based COVID-19 vaccine maker BioNTech .

"For the current year, the prospect is for a large surplus and in case of a worse-than-expected outcome there are ample reserves in most cases," the Bundesbank said in its monthly report.

"In any case, the federal government will assume the vast majority of the burden of the current energy crisis."

The German federal government recorded a deficit of 42.8 billion euros in the first half of the year, only partly offset by a surplus of 16 billion euros for German states and smaller ones for local communities, according to statistics agency Destatis.

The Bundesbank also repeated its forecast for a recession in the last three months of this year and the first three of the next as high energy costs and lower exports take their toll.

"Overall, economic output could fall significantly in the winter months," the Bundesbank said.

It added the extent of the decline would depend on how the government tackles the high gas and electricity prices. ($1 = 1.0267 euros) (Reporting By Francesco Canepa)