The German economy grew in the second quarter, propped up by household and government spending and beating analyst expectations that saw it on the edge of a downturn, data showed today.

Europe's largest economy grew by 0.1% quarter on quarter and 1.7% on the year, adjusted for price and calendar effects, the federal statistics office said.

Analysts polled by Reuters had expected the economy to stagnate quarter on quarter in the three months to June, in line with the statistics office's earlier flash estimate.

Household expenditures were up by 0.8% compared with the first quarter, despite high inflation rates and an energy crisis, said the office. Government consumption grew by 2.3%.

Analysts said the concerns about the economy remained acute.

"The negative factors are currently so great that even a sharper downturn cannot be ruled out," VP Bank chief economist Thomas Gitzel said.

"Or to put another way: A lot of positive things would have to happen for a recession not to materialise," he added.

The S&P Global flash composite Purchasing Managers' Index (PMI) showed similar sentiment, with the reading indicating contraction for the second month in a row.

Meanwhile, German business morale in August fell to its lowest reading since June 2020 amid high uncertainty due to the Ukraine war and fears of economic downturn in the third quarter.

The Ifo institute's closely watched business climate index fell for a third consecutive month but less than expected to 88.5, from an upwardly revised reading of 88.7 in July.

A Reuters poll of analysts had pointed to an August reading of 86.8.

"Uncertainty among the companies remains high, and the German economy as a whole is expected to shrink in the third quarter," said Ifo President Clemens Fuest.

Commerzbank chief economist Joerg Kraemer said consumers and companies were suffering from the gas crisis, especially as consumers seemed to have already spent what money they had saved during the coronavirus pandemic.

"We expect the second half of the year and the first quarter of next year to be more recessionary than ever," he said.

The German economy grew 0.1% in the second quarter despite the war in Ukraine and worries about the energy supply thanks to household and government consumption.

European countries have been racing to fill their gas storage facilities as Russian energy giant Gazprom has reduced supply via the Nord Stream 1 pipeline, increasing concerns about a potential gas shortage come wintertime.

The Ifo economic institute also expects the German economy to shrink by about half a percentage point in the third quarter and a recession is still on the cards, Ifo economist Klaus Wohlrabe told Reuters today.

Sentiment in the foreign trade sector is really poor, burdened by high inflation, Wohlrabe said, adding that the good news from the institute's August survey was that supply chain bottlenecks in industry had eased significantly.