A war in the Middle East could complicate efforts to contain inflation at a time when world output is “limping along.”The International Monetary Fund said on Tuesday that the pace of the global economic recovery is slowing, a warning that came as a new war in the Middle East threatened to upend a world economy already reeling from several years of overlapping crises.The eruption of fighting between Israel and Hamas over the weekend, which could sow disruption across the region, reflects how challenging it has become to shield economies from increasingly frequent and unpredictable global shocks. The conflict has cast a cloud over a gathering of top economic policymakers in Morocco for the annual meetings of the I.M.F. and the World Bank.Officials who planned to grapple with the lingering economic effects of the pandemic and Russia’s war in Ukraine now face a new crisis.“Economies are at a delicate state,” Ajay Banga, the World Bank president, said in an interview on the sidelines of the annual meetings. “Having war is really not helpful for central banks who are finally trying to find their way to a soft landing,” he said. Mr. Banga was referring to efforts by policymakers in the West to try and cool rapid inflation without triggering a recession.Mr. Banga said that so far, the impact of the Middle East attacks on the world’s economy is more limited than the war in Ukraine. That conflict initially sent oil and food prices soaring, roiling global markets given Russia’s role as a top energy producer and Ukraine’s status as a major exporter of grain and fertilizer.“But if this were to spread in any way then it becomes dangerous,” Mr. Banga added, saying such a development would result in “a crisis of unimaginable proportion.”Oil markets are already jittery. Lucrezia Reichlin, a professor at the London Business School and a former director general of research at the European Central Bank, said, “the main question is what’s going to happen to energy prices.”Ms. Reichlin is concerned that another spike in oil prices would pressure the Federal Reserve and other central banks to further push up interest rates, which she said have risen too far too fast.As far as energy prices, Ms. Reichlin said, “we have two fronts, Russia and now the Middle East.”Smoke rising from bombings of Gaza City and its northern borders by Israeli planes.Samar Abu Elouf for The New York Times Pierre-Olivier Gourinchas, the I.M.F.’s chief economist, said it’s too early to assess whether the recent jump in oil prices would be sustained. If they were, he said, research shows that a 10 percent increase in oil prices would weigh down the global economy, reducing output by 0.15 percent and increasing inflation by 0.4 percent next year. In its latest World Economic Outlook, the I.M.F. underscored the fragility of the recovery. It maintained its global growth outlook for this year at 3 percent and slightly lowered its forecast for 2024 to 2.9 percent. Although the I.M.F. upgraded its projection for output in the United States for this year, it downgraded the euro area and China while warning that distress in that nation’s real estate sector is worsening.“We see a global economy that is limping along, and it’s not quite sprinting yet,” Mr. Gourinchas said. In the medium term, “the picture is darker,” he added, citing a series of risks including the likelihood of more large natural disasters caused by climate change.Europe’s economy, in particular, is caught in the middle of growing global tensions. Since Russia invaded Ukraine in February 2022, European governments have frantically scrambled to free themselves from an over-dependence on Russian natural gas.They have largely succeeded by turning, in part, to suppliers in the Middle East.Over the weekend, the European Union swiftly expressed solidarity with Israel and condemned the surprise attack from Hamas, which controls Gaza.Some oil suppliers may take a different view. Algeria, for example, which has increased its exports of natural gas to Italy, criticized Israel for responding with airstrikes on Gaza.Even before the weekend’s events, the energy transition had taken a toll on European economies. In the 20 countries that use the euro, the Fund predicts that growth will slow to just 0.7 percent this year from 3.3 percent in 2022. Germany, Europe’s largest economy, is expected to contract by 0.5 percent.High interest rates, persistent inflation and the aftershocks of spiraling energy prices are also expected to slow growth in Britain to 0.5 percent this year from 4.1 percent in 2022.Sub-Saharan Africa is also caught in the slowdown. Growth is projected to shrink this year by 3.3 percent, although next year’s outlook is brighter, when growth is forecast to be 4 percent.Staggering debt looms over many of these nations. The average debt now amounts to 60 percent of the region’s total output — double what it was a decade ago. Higher interest rates have contributed to soaring repayment costs.This next-generation of sovereign debt crises is playing out in a world that is coming to terms with a reappraisal of global supply chains in addition to growing geopolitical rivalries. Added to the complexities are estimates that within the next decade, trillions of dollars in new financing will be needed to mitigate devastating climate change in developing countries.One of the biggest questions facing policymakers is what impact China’s sluggish economy will have on the rest of the world. The I.M.F. has lowered its growth outlook for China twice this year and said on Tuesday that consumer confidence there is “subdued” and that industrial production is weakening. It warned that countries that are part of the Asian industrial supply chain could be exposed to this loss of momentum.In an interview on her flight to the meetings, Treasury Secretary Janet L. Yellen said that she believes China has the tools to address a “complex set of economic challenges” and that she does not expect its slowdown to weigh on the U.S. economy.“I think they face significant challenges that they have to address,” Ms. Yellen said. “I haven’t seen and don’t expect a spillover onto us.” More