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.
Nevertheless, the welcome news was tempered somewhat by developments later on Friday with the announcement of a new record-high level of inflation.
According to Destatis, the rise in consumer prices in Germany accelerated in October to 10.4%, in comparison with the same time last year. In September it was 10%, year-on-year inflation.
As in previous months, October's hike was largely down to energy prices, as they increased by 43% compared with the same time last year. According to the statistics, food prices rose by around 23%.
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 a "technical recession" next year.
While you're here: Every Tuesday, DW editors round up what is happening in German politics and society. You can sign up here for the weekly email newsletter Berlin Briefing.
jsi, lo/rt (AFP, dpa)