The German economy grew 0.3 percent in the fourth quarter from the quarter before thanks to higher consumer and government spending.

Those domestic factors offset a downward effect from Germany's typical strength, foreign trade.

The largest of the 19 economies that use the euro currency weathered headwinds from an economic slowdown in China and from turbulent financial markets.

The state statistics service said Friday that "positive contributions were made by domestic demand" and that government spending was "markedly up." At the same time, trade made less of a contribution as exports fell.

For 2015 as a whole, the German economy grew by 1.7 percent.