Foreign trade drove a 0.6% expansion in Europe's largest economy between October and December, German data showed today.
The momentum from the fourth quarter is widely expected to carry over into the start of 2018.
The data, which confirmed a preliminary reading, shows the German economy ended last year on a strong footing despite unaccustomed political uncertainty in a country that prides itself on its stability.
Germany is still awaiting a new government five months after an inconclusive election in September.
Chancellor Angela Merkel's conservatives and the Social Democrats (SPD) have agreed to form a coalition but SPD members still have the chance to veto that deal in a ballot.
The Federal Statistics Office said exports, which have traditionally propelled the German economy, climbed by 2.7% on the quarter and imports rose by 2% so net trade contributed 0.5 percentage points to growth.
But private consumption, which has been a key pillar of support in recent years, was stagnant - as was gross capital investment. Neither made any contribution to growth.
German government spending increased, adding 0.1 percentage points to growth.
The finance ministry expects the economic upturn to continue at the start of 2018 and Ifo chief Clemens Fuest has said business confidence levels pointed to a 0.7% expansion between January and March.
Ifo's monthly survey showed morale among businesses weakening in February but remaining at a high level overall even though a stronger euro weighed on the outlook for exporters.
Other recent surveys have shown private sector growth slowing and investor sentiment deteriorating.
In a sign that household spending could pick up in the first quarter, consumer morale is at it highest since 2001, with Germans benefiting from record-high employment, strong job security, rising real wages and low borrowing costs.
The outlook is rosy according to Germany's central bank, the Bundesbank. It expects the economy to expand by a calendar-adjusted 2.5% this year - the strongest rate of growth since 2011.