Data on Friday showed inflation's tightening stranglehold on the German economy, with a surge in import prices and falls in industrial output and retail sales adding to signs that Europe's biggest economy is heading for recession.

Import prices for energy were up 162.4% in August compared with the same month in 2021, with prices of natural gas up a whopping 306.3% year-on-year as the fallout from Russia's war on Ukraine continued to upend European energy markets.

Data last month showed German inflation was at its highest in more than a quarter of a century in September, driven primarily by high energy costs.

That is disrupting activity in an industrial sector already grappling with supply chain problems and pushing up costs for retailers, which are struggling to pass them on to cash-strapped shoppers.

Industrial output in August saw a month-on-month drop of 0.8%, the sharpest fall since March, the first full month of Russia's invasion of Ukraine, the statistics office said.

Meanwhile, consumers were particularly reluctant to spend on food in August, the office said, with retail food sales down 1.7% on the month and down 3.1% on the year - the lowest in more than five years.

"When looking into their wallets, many consumers will continue to put the brakes on spending," said Alexander Krueger, economist at private bank Hauck Aufhaeuser.

With sky-high energy prices weighing on both consumers and industry, an economic recession seems inevitable, said ING economist Carsten Brzeski.

"The only question is how severe such a contraction or recession will be," he said.

The German government expects the economy to shrink 0.4% next year, sources told Reuters on Thursday, citing provisional figures. The government is due to release forecasts on Wednesday. (Reporting by Miranda Murray and Rene Wagner Editing by Rachel More and Mark Potter)