Germany defied forecasts of a second quarterly contraction in a row in July-September with inching economic growth, official data showed Thursday, narrowly escaping a recession but with no all-clear for its trade war-battered industries.

Gross domestic product (GDP) expanded 0.1 percent quarter-on-quarter, federal statistics authority Destatis said, beating forecasts of a 0.1 percent contraction from analysts surveyed by Factset.

The statisticians also revised figures for the first half of the year, saying the economy shrank by 0.2 percent in April-June, rather than 0.1 percent as previously reported, and grew 0.5 percent in the first quarter, 0.1 percentage points faster than thought.

As in previous quarters, "positive impulses came above all from consumption" by households and the state, Destatis said in a statement.

Exports and construction also expanded, while investments in new equipment fell compared with April-June.

Third-quarter growth was "a hefty, but happy surprise," analyst Jens-Oliver Niklasch of LBBW bank commented.

"In recent months, there were growing hints that other economic sectors were not infected by weakness in industry."

Manufacturing has stuttered in recent months, with a 1.3-percent September drop in output contributing to that month's 0.6-percent overall fall in industrial production.

German industry, which is mainly oriented towards exports, has suffered months of headwinds from the US-China trade war, President Donald Trump's threat of US duties on European car imports and Brexit uncertainty.

The German government is expecting just 0.5 percent growth this year and last month revised down its projections for 2020 to a 1.0 percent expansion, compared with previous forecasts of 1.5 percent.

Industry's stumbles and fears of recession have revived debate in Germany about whether the government should stick to a self-imposed rule to keep the budget balanced -- a dogma known as the "black zero".

The zero deficit rule is not legally binding -- unlike the "debt brake" which allows for a federal budget deficit of up to 0.35 percent of GDP.

A group of expert economists known as the "Wise Men" earlier this month advised German Chancellor Angela Merkel's government to loosen this tough no-new-debt policy "in case of a broad, deep recession".

But they concluded that Germany was not yet in a situation where relaxing the policy would be justified.

Attention! Has growth been 'decanted' out of the German economy?
Attention! Has growth been 'decanted' out of the German economy? AFP / INA FASSBENDER

The Federation of German Industry said the report was "a wake-up-call to politicians to boost growth".

Merkel has so far ignored the growing calls.

Addressing the economic experts, she said: "You say clearly that a balanced budget and plenty of investment are important, if I understand rightly".

During the G7 summit in August, Merkel said Germany "cannot live sustainably beyond our means" and must be able to finance state pensions for an ageing population.

Looking ahead, surveys of business confidence remain weak despite hints of cooling in the US-China trade war.

"With policymakers unlikely to loosen fiscal policy significantly, we think a mild recession is more likely than not in the coming year," Andrew Kenningham of Capital Economics said.

Germany's European partners and international financial institutions are joining in the calls for Berlin to do more to boost its economy.

French President Emmanuel Macron last week called on Germany to "re-pivot" its budgetary policy to boost European growth.

The European Central Bank's new president Christine Lagarde on October 30 also sent a strong message.

She said that "countries with chronic budget surpluses like the Netherlands and Germany" need to increase spending to redress "imbalances" in the eurozone.

But even easing budgetary policy may not be enough.

A report by Berenberg bank in September said lengthy bureaucracy, under-staffed local governments and slow legal procedures meant that a rapid mobilisation of financial resources would be "difficult".

That may leave domestic consumption holding out as the last remaining buttress of German output.

The "Wise Men" in their report argued that higher salaries and favourable loan conditions in recent years were helping to boost demand.

They argued this in turn could "stimulate growth" in the future through more investment in construction and higher household consumption.