* GDP registered 0.0 pct q/q growth in Q4
* After Q3 contraction, Germany just avoids recession
* Economists cautious on outlook given trade, Brexit angst (Adds fresh economist comment, background)
BERLIN, Feb 14 (Reuters) - The German economy stalled in the final quarter of last year, narrowly escaping recession, as the fallout from global trade disputes and Brexit threatened to derail a decade-long expansion in Europe's economic powerhouse.
Gross domestic product in Europe's biggest economy was unchanged for the quarter, the Federal Statistics Office said on Thursday. A Reuters poll had forecast growth of 0.1 percent.
German companies are grappling with a cooling global economy and trade disputes triggered by U.S. President Donald Trump. It also faces the risk that Britain will leave the European Union in March without an agreement on the terms of its withdrawal.
"Germany got away with a black eye," DekaBank economist Andreas Scheuerle said of the fourth-quarter numbers. "But the first quarter is not looking like it is going to be easy, either, as political uncertainties are weighing heavily on corporate confidence."
With growth unchanged in the fourth quarter, the economy escaped recession -- defined as two or more consecutive quarters of contraction -- after it shrank by 0.2 percent in the third quarter.
Germany's economy grew at its weakest rate in five years in 2018. Growth is forecast to shrink further to 1 percent this year, and the country faces a budget shortfall of around 25 billion euros by 2023.
The fallout from the trade disputes and concern about Brexit are weighing on business confidence, which fell for the fifth consecutive month in January.
Morale is also being depressed by weaker demand for German goods and services in China, the euro zone and emerging markets.
Furthermore, the government is concerned that technological innovation and the acquisition of German industrial know-how by foreign - particularly Chinese - companies could erode the manufacturing base on which much of Germany's wealth is built.
Economy Minister Peter Altmaier said last week the government might take stakes in key domestic companies to prevent foreign takeovers - a shift in policy he said was needed to safeguard Germany's prosperity.
Presenting an unusually gloomy outlook for Europe's biggest economy, Bundesbank President Jens Weidmann said late last month the economic slump would last longer than earlier thought and more bad news was coming.
With German growth stalling, the European Central Bank is likely put off plans to normalise policy any further, economists say, and it is more likely to provide further stimulus, rather than less.
"The upside from today's data is that it can hardly get worse," ING economist Carsten Brzeski said.
"Economic fundamentals remain solid, and from here on, chances of a rebound are still much higher than chances of yet another disappointment," he added.
(Additional reporting by Rene Wagner, editing by Larry King)