German gross domestic product (GDP) grew by 0.4 percent in the period from October to December, slightly faster than analysts' expectations and also up from growth of 0.3 percent in the preceding three months, the federal statistics office Destatis said.
"Positive impulses came primarily from net foreign trade," Destatis explained.
"According to preliminary calculations, exports grew much more strongly than imports. By contrast, the signals from domestic demand were more mixed," the statisticians said.
Public spending stagnated and consumer spending was down slightly, but positive developments were seen in investment.
Investment in both construction and equipment was up strongly, but companies also sharply reduced their stockpiles "and that put the brakes on growth," Destatis said.
Analysts were cheered by the better-than-expected data.
The numbers were "a positive surprise," said ING DiBa economist Carsten Brzeski, asking whether the German economy was "finally picking up".
"Recent monthly data had painted a rather confusing picture with strong soft data but disappointing hard data," the expert said.
"Today's growth outcome is actually better than monthly hard data had suggested.
"Looking ahead, the German economy should gain further momentum. Filled order books and the latest inventory reductions bode well for industrial production in the coming months.
"Moreover, the construction sector, driven by the mild winter weather and government investment, should be growth-supportive throughout 2014," Brzeski said.
"Germany remains the economic stronghold of the eurozone. In fact, this morning's data was one of those positive surprises the eurozone has seen too seldom over the last few quarters. Let's hope it won't be the last one," he said.
Newedge Strategy analyst Annalisa Piazza was also upbeat, even if she found the GDP data "a bit of a mixed bag".
"Prospects for the future remains relatively bright and we expect activity to continue to improve at a moderate pace going forward," she said.
Investment is key
Berenberg Bank economist Christian Schulz said exports likely received a boost from the strengthening global recovery, particularly in the US and Britain and stabilizing demand in the euro area.
"But since exports are unlikely to remain a reliable growth driver in 2014 due to potentially stronger import growth and the likely wobbles in some emerging markets, the strength in investment is of key significance," Schulz said.
"With uncertainty receding companies are beginning to use the cash reserves built up during the crisis to exploit their strong competitive position and invest."
Schulz said he found the disappointing drop in household spending puzzling, "given how strong the fundamental position of households is, with low unemployment, low inflation, rising wages and consumer confidence reflecting receding uncertainty.
"We do expect consumption to continue to make moderate positive growth contributions in 2014, but investment is the key factor behind our optimistic forecast of 2.2 percent growth in 2014," Schulz said.