The German federal statistics office (Destatis) announced better-than-expected figures for the German economy in the third quarter on Friday.
Output, powered by consumer spending, increased by 0.3% quarter on quarter preliminary figures show.
"The German economy managed to hold its ground despite difficult framework conditions of the global economy with the continuing Covid-19 pandemic, supply chain interruptions, rising prices, and the war in Ukraine," Destatis said.
It comes off the back of 0.8% gross domestic product growth in the previous quarter.
The economic picture looks gloomy
Analysts surveyed by Factset had expected Europe's largest economy to contract by -0.2%.
"Today's positive growth data is a welcome surprise. However, it does not mean that the German economy will be able to prevent a recession," said ING economist Carsten Brzeski told the AFP news agency.
"The recession is only delayed, not canceled."
Earlier in October, the International Monetary Fund in its World Economic Outlook predicted that key European economies, including Germany, would fall into "technical recession" next year.
The German government predicts the economy will shrink in 2023. The economy ministry expects Germany's gross domestic product to decline by 0.4% next year, DW reports.