Germany is set to narrowly escape a recession this year, the government said Wednesday, as Europe's biggest economy weathers the fallout from the Ukraine war better than expected.

Industrial powerhouse Germany is forecast to eke out growth of 0.2 percent in 2023, the economy ministry said in its latest projections.

Back in October, when fears were running high about soaring energy costs in the wake of Russia's war in Ukraine, Berlin was bracing for a contraction of 0.4 percent in 2023.

"The government has fended off the economic crisis," Chancellor Olaf Scholz told lawmakers in Berlin.

"We have shown what we are capable of."

Massive government intervention has helped keep the lid on energy costs for households and businesses after Russia cut deliveries of natural gas last year.

As well as racing to diversify supplies, Berlin has unveiled a 200-billion-euro ($212-billion) support package to cushion the energy crisis, including a cap on electricity and gas prices.

Mild winter weather and falling wholesale gas prices recently have further bolstered confidence that the expected downturn will not be as painful as initially thought.

"The crisis is not over," Economy Minister Robert Habeck told a Berlin press conference where he presented the latest projections.

"But we have been able to avoid the worst scenarios," he said, praising the "extreme adaptability" shown by German firms.

Habeck said Germany may still suffer a technical recession -- two consecutive quarters of contraction -- but that momentum would pick up as the year progresses.

The more upbeat mood was highlighted in an Ifo survey on Wednesday, which showed business confidence improving for a fourth straight month in January.

- Headwinds -

The German economy already defied predictions by dodging a contraction in the final quarter of 2022, official data showed last week.

Over the whole of 2022 output expanded by 1.9 percent, the data showed, better than analysts had predicted.

Lower energy prices have also helped bring down inflation from a peak of 10.4 percent in October, and the economy ministry expects the trend to continue.

For 2023, consumer price growth is now tipped to reach six percent, down from an earlier estimate of seven percent.

But Europe's top economy is not out of the woods yet, analysts said.

"Not falling off the cliff is one thing, staging a strong rebound, however, is a different matter," ING bank economist Carsten Brzeski said.

On the bright side, he said, Germany's export-oriented economy will likely benefit from China's relaxation of Covid curbs, while lower inflation could boost consumer spending at home.

- 'Big programmes' -

But industrial production remains below pre-pandemic levels, and uncertainty lingers about energy security during the winter of 2023-2024.

Households and companies have also yet to feel the full impact of higher borrowing costs resulting from the European Central Bank's interest rate rises to cool inflation, Brzeski noted.

In the years ahead, Germany will also have to find ways to tackle a major shortage of skilled workers.

The country currently has two million vacancies and counting, according to the German Chamber of Commerce and Industry (DIHK).

Habeck acknowledged the challenge, saying Germany had to do more to attract and nurture talent, including from abroad.

He also pledged "big programmes" to support companies through Germany's green energy transition, particularly those in energy-intensive industries.

"We have to invest in future markets, in keeping our country competitive," Habeck said.