By Michael Nienaber

BERLIN (Reuters) - German economic growth slowed more than expected in the third quarter of 2016 as exports fell after Britain's vote to leave the European Union, but Europe's largest economy looked set for a fourth-quarter rebound.

The economy grew by 0.2 percent in the July-September period after expanding by 0.4 percent in the three months to June, the Federal Statistics Office said. That was weaker than the consensus forecast for 0.3 percent growth.

Analysts expect the economy to end the year on a stronger note, though some are worried about the longer-term outlook for German exports in the light of protectionist campaign promises by U.S. President-elect Donald Trump.

"In our view, the latest less dynamic growth figure is not a reason to be concerned," UniCredit economist Andreas Rees said, adding that most forward-looking data suggested the Q3 slowdown was a bump in the road, not a signal of longer-lasting weakness.

DekaBank analyst Andreas Scheuerle agreed, saying the signs for the final quarter were looking good as global demand for German goods was picking up again.

Supporting this view, a survey by the Mannheim-based ZEW institute showed on Tuesday that the mood among German investors improved more than expected in November.

ZEW President Achim Wambach attributed the fourth consecutive monthly rise in the economic sentiment indicator to positive data in the United States and China.

"The election of Donald Trump as U.S. President and the resulting political and economic uncertainties have, however, had an impact," Wambach said, adding that sentiment had deteriorated since last week's election.

Chancellor Angela Merkel told a business conference in Berlin that the German economy was doing fine and had shown it could adapt to a changing global environment. In a thinly veiled reference to Trump, she warned against protectionism.

"Growth is declining, uncertainties are rising," Anton Boerner, head of the BGA trade association, said, adding that a trend toward isolation and protectionism would pose a threat for German exporters.

CONSUMER BOOM

Third quarter growth was hit by a slowdown in foreign trade as exports fell slightly and imports rose marginally, the Statistics Office said.

"Positive impulses on the quarter came mainly from domestic demand. Both household and state spending managed to increase further," it said. Higher investment in construction also contributed to overall growth.

Domestic demand has overtaken trade as the most important growth driver in Germany, with falling unemployment, rising real wages and low interest rates pushing households to spend more.

The government is raising public investment in infrastructure and is spending more than 20 billion euros ($22 billion) on housing and helping more than a million migrants who arrived in Germany over the past 18 months.

The government forecasts growth of 1.8 percent, the highest in five years, in 2016 and a slowdown to 1.4 percent in 2017.

ING Bank economist Carsten Brzeski said the domestic economy should be strong enough to ensure solid, though perhaps waning, support for overall growth in the coming quarters.

"However, if Germany's single most important trading partner, the U.S., really moves towards more protectionism, this would definitely leave its mark on German growth," he said.

German exporters are struggling amid an uncertain global economic environment after Britain's vote to leave the EU and Trump's election victory, the Economy Ministry said last week.

The United States accounts for roughly 10 percent of Germany's sales abroad. In 2015, German companies sold goods there worth 114 billion euros ($123 billion), 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, which could shrink if Trump acts on his protectionist campaign pledges.

(Additional reporting by Paul Carrel and Gernot Heller; Editing by Madeline Chambers and Louise Ireland)