U.K. Chancellor of the Exchequer George Osborne (right) and Bank of England Gov. Mark Carney attend a meeting of G-20 finance ministers and central bank governors during the IMF-World Bank meetings in Washington. REUTERS

U.K. Chancellor of the Exchequer George Osborne on Friday said a string of ugly economic data from Germany is “the greatest cause for concern” about the outlook for the European and global economies, and said eurozone governments must stick to their budget rules.

The U.K. economy has been one of the fastest-growing developed economies over the past 12 months, but Mr. Osborne said he is concerned that recovery may be wakened if the eurozone slows.

“We are at a critical moment,” he told reporters during the annual meetings of the International Monetary Fund in Washington. “Serious clouds are gathering on the horizon. The biggest risk to the global economy is the risk of the eurozone falling back into recession and crisis.”

The eurozone economy stagnated in the second quarter, and recent data show few signs of a pickup. Concerns that the currency area may slip back into contraction were heightened this week by a run of poor data from Germany, including a drop in exports and poor readings for manufacturing orders and factory output.

The 18 countries that use the euro account for 40% of Britain’s exports. Mr. Osborne said that while the U.K. is “not immune” to eurozone economic weakness, it is “not powerless.”

“We have a credible economic plan that is working,” he said, pledging to stick to his plans to cut the budget deficit.

The French government has argued fiscal policy in the eurozone needs to adapt to the weak economic outlook in the currency zone, and that policy makers must create conditions for more vigorous growth. France’s 2015 budget includes a deficit well above the 3% of gross domestic product limit set by European Union rules.

The European Commissionis considering whether to reject the plan, and the head of Germany’s central bank criticized the French budget in an interview with The Wall Street Journal this week.

Mr. Osborne didn’t refer directly to that budget, but indicated the U.K. shares the same view as Germany, which wants strict adherence to those rules.

“If you have created a whole set of rules to demonstrate your fiscal responsibility, you can’t go breaking them at the first test,” he said.

The eurozone’s slowdown has led to calls for a program of investments in infrastructure from the incoming head of the European Commission and the International Monetary Fund. But Mr. Osborne said he was “skeptical” of any program that would add to government debt, and said any spending on upgrading roads and other infrastructure should be funded by cuts elsewhere, and particularly to social welfare programs.

Eurozone policy makers will once again come under pressure to confront the causes of persistently weak growth from their counterparts in other parts of the world during the meetings, which include a gathering of finance ministers and central banks from the Group of 20 largest economies.

“They’re very conscious of the fact that, once again, they are under the microscope,” Mr. Osborne said. “They know they have questions to answer.”

Write to Paul Hannon at paul.hannon@wsj.com