The British economy stagnated in the final three months of last year as the country struggled under the weight of a cost-of-living crisis that is squeezing household budgets, crimping business investment and fueling labor unrest.

The Office for National Statistics said Friday that gross domestic product, the broadest measure of economic activity, failed to grow during the fourth quarter of 2022. Monthly estimates suggest that economic activity slowed at the end of the year, with output shrinking 0.5% in December.

However, the figures showed that Britain dodged a second consecutive quarter of contraction, which is one definition of a recession. Britain doesn’t have an independent body that declares recessions like in the U.S. and Europe, where official panels use a variety of economic data, including unemployment and consumer and business spending, to make their assessments.

While the U.K. avoided a “technical recession,” strikes by train drivers, medical staff and other public-sector workers added to the slowdown in December, said Suren Thiru, economics director at the Institute of Chartered Accountants in England and Wales.

“The U.K. is facing a particularly brutal year with high inflation, stealth tax rises and the lagged impact of numerous interest rate hikes still likely to push us into a summer downturn by hammering incomes and confidence,” Thiru said.

Overall, the economy expanded 4% for the year, more than any other member of the Group of Seven advanced economies.

But that growth occurred in the early part of the year, before Russia’s invasion of Ukraine sparked sharp rises in food and energy prices.

Inflation in the U.K. remains at levels last seen in the early 1980s, squeezing household budgets and crimping business investment. Consumer prices rose 10.5% in December from a year earlier after peaking at 11.1% two months earlier.

In an effort to slow inflation, the Bank of England has raised interest rates 10 times since December 2021, increasing the cost of mortgages, credit cards and business loans.

The National Institute of Economic and Social Research warned earlier this week that 2023 will “certainly feel like a recession,” as persistent inflation, slow growth and rising taxes squeeze household incomes.

About one in four U.K. households — some 7 million families — won’t be able pay food and energy bills from their post-tax income in the 2023-24 financial year, up from one in five in 2022-23.

The International Monetary Fund last month forecast that the U.K. would be the only major economy to shrink this year, even as the outlook for the rest of the world improves.

Amid the gloom, Treasury chief Jeremy Hunt chose to focus on the growth in the U.K. economy over the whole of 2022, which he said showed Britain was more resilient than many feared.

“However, we are not out the woods yet, particularly when it comes to inflation,” Hunt said. “If we stick to our plan to halve inflation this year, we can be confident of having amongst the best prospects for growth of anywhere in Europe.”