German economic growth slowed more than expected in the third quarter of 2016 as exports fell after the UK vote to leave the European Union.
But Europe's largest economy looked set for a fourth-quarter rebound.
The economy grew by 0.2% on the quarter between July and September after expanding by 0.4% in the three months to June, Germany's Federal Statistics Office said.
That was weaker than the consensus forecast in a Reuters poll for 0.3% growth.
The statistics office said German growth was slowed down by foreign trade in the third quarter as exports fell slightly on the quarter and imports rose marginally.
"Positive impulses on the quarter came mainly from domestic demand. Both household and state spending managed to increase further," it said.
Private consumption has overtaken trade as the most important growth driver in Germany, with unemployment at its lowest ever, higher real wages and low interest rates pushing households to spend more.
Spending on construction rose slightly and fell in machinery and equipment edged down, the statistics office said.
The German government has spent more on roads and is spending more than €20 billion on housing and helping an influx of more than a million migrants over the past 18 months.
Unadjusted data showed the economy expanded by 1.5% on the year in the third quarter, also missing the Reuters consensus forecast for 1.8% growth.
Today's figures show that on a working-day adjusted basis, the annual GDP growth rate was 1.7%.
The German government is forecasting growth of 1.8%, the highest in five years, in 2016 and a slowdown to 1.4% in 2017.
"Brexit meets solid domestic economy. This is probably the best description of the German economic performance during the third quarter," ING Bank economist Carsten Brzeski said.
The domestic economy should be strong enough to ensure solid, though perhaps waning, support in coming quarters, he said.
"However, if Germany's single most important trading partner, the US, really moves towards more protectionism, this would definitely leave its mark on German growth," he said.
German exporters are struggling amid a global economic environment characterised by uncertainty following the Brexit decision and Donald Trump winning the US presidential election, the Economy Ministry said last week.
The US accounts for roughly 10% of Germany's sales abroad. In 2015, German companies sold goods worth €114 billion to the US, mainly vehicles, machines and chemical products.
The Munich-based Ifo institute estimates that more than 1 million jobs in Germany are linked to those exports that could shrink if Trump acts on his protectionist campaign pledges.
German investor confidence soars but Trump clouds on horizon
Investor confidence in Germany jumped sharply for the second month in a row in November although there are worries about Donald Trump's election as US president, the ZEW economic institute said today.
The institute's headline sentiment barometer hit 13.8 points, up from 6.2 points in October. Analysts had predicted the indicator would stand at 8.9 points.
"Positive economic data from the US and China" had boosted investors' mood yet further in November, ZEW president Achim Wambach said in a statement.
But the investor survey also covered the November 8 presidential election in the US, and "the reported expectations after the election were less positive than before," he warned.
Germany exports more goods to the US than to any other country, making it vulnerable to protectionist moves Trump promised during his campaign under the motto "America First".
However, the confident mood among investors "points to stronger economic growth in the coming six months," Wambach said.
Before the October bounce in morale, investor sentiment had remained at low levels in August and September in response to Britain's vote to leave the EU.