The eurozone economy stagnated late last year as a lingering energy crisis sparked a loss of competitiveness in some European industries, and consumers reined in spending to grapple with high living costs, Europe’s statistics agency reported Tuesday.

But economists believe the worst may be over, as the European Central Bank continues its campaign to wring out inflation without plunging the eurozone economy into a deep downturn.

Economic output in the 20 countries that use the euro currency grew at zero percent in the last three months of 2023 versus the previous quarter, after contracting in the third quarter, narrowly avoiding a recession. Compared with a year ago, the eurozone grew by just 0.1 percent.

The anemic pace is keeping Europe far behind the United States, where the economy, although slowing from a breakneck growth pace, continues to be powered by consumer spending. Aggressive interest rate increases by the Federal Reserve have brought a slowdown in inflation, and the Fed is expected to begin unwinding those increases soon.

“The gap in economic activity between the U.S. and eurozone is widening significantly at the moment,” said Bert Colijn, chief eurozone economist at ING Bank. “Part of this is structural as the eurozone faces a loss of competitiveness on the back of structural changes in the economic environment since the war in Ukraine and energy crisis.”

In Europe, businesses have been forced to raise wages in the last year to help workers and consumers keep up with high costs. That has added to the challenges facing policymakers at the E.C.B., who, like the Fed, had ratcheted up interest rates to curb the rise in prices before recently pausing their campaign.