FRANKFURT, Germany (AP) — A closely watched survey of German business optimism sagged for the fourth month in a row, underlining concern about the impact on Europe’s largest economy from sharply higher energy prices and stubborn bottlenecks in supplies of raw materials and parts.

The Munich-based Ifo Institute, which compiles the survey of thousands of German businesses about their outlook, said Monday that its index fell to 97.7 points in October, from 98.9 in September.

“Sentiment in the German economy has clouded over,” institute President Clemens Fuest said in a statement. “Supply problems are giving businesses headaches.”

Supply chain bottlenecks have held back business activity as the global economy rebounds from COVID-19 restrictions and closures. The recovery has seen increased demand and limited supply for everything from oil to computer parts. One of the most glaring shortages has been in semiconductor components for car and truck makers, which have not been able to make as many vehicles as they wanted to or could sell.

The recovery also has been accompanied by a burst of inflation that could leave consumers with less spending power. Carsten Brzeski, global head of macro at ING bank, said it was hard to predict when the supply chain frictions would end and that it could take until next summer before things are back to normal.

“All of this means that there is not only an increasing risk that the German economy could come to a complete standstill in the final quarter of the year, there is also the clear risk that the economy will not reach pre-crisis levels this year,” he said by email.

Brzeski said the only upside was the ingredients remain for a solid recovery: full order books at manufacturing companies, low unemployment in Germany, and excess savings that consumers have to spend after the pandemic restrictions eased.