Hong Kong CNN Business  — 

China’s economy grew more than expected last year, even as the rest of the world was upended by the coronavirus pandemic.

The world’s second largest economy expanded 2.3% in 2020 compared to a year earlier, according to government statistics released Monday.

It’s China’s slowest annual growth rate in decades — not since 1976 has the country had a worse year, when GDP shrunk 1.6% during a time of social and economic tumult.

But during a year when a crippling pandemic plunged major world economies into recession, China has clearly come out on top. The expansion also beat expectations. The International Monetary Fund, for example, predicted that China’s economy would grow 1.9% in 2020. It’s the only major world economy the IMF expected to grow at all.

The pace of the recovery appears to be accelerating, too: GDP grew 6.5% compared to a year ago, faster than the third quarter’s 4.9% growth.

“The performance was better than we had expected,” said Ning Jizhe, a spokesman for China’s National Bureau of Statistics, at a press conference in Beijing.

The country scrapped its growth target last year for the first time in decades as the pandemic dealt a historic blow to the economy. GDP shrank nearly 7% in the first quarter as large swaths of the country were placed on lockdown to contain the spread of the virus.

Since then, though, the government has attempted to spur growth through major infrastructure projects and by offering cash handouts to stimulate spending among citizens.

Industrial production was a particularly big driver of growth, jumping 7.3% in December from a year earlier.

“In and out of lockdown ahead of everybody else, the Chinese economy powered ahead while much of the world was struggling to maintain balance,” wrote Frederic Neumann, co-head of Asian economics research at HSBC, in a Monday research report.

This has “put a floor under growth” in other regional markets, he added. Surging Chinese investment in infrastructure and property, for example, has been a boon to countries like Australia, South Korea and Japan that exported supplies to China.

Trade has also been strong. China’s overall surplus for the year hit a record $535 billion, up 27% from 2019, according to statistics released last Friday. Analysts pointed out that the country benefited from a lot of demand for protective gear and electronics as people around the world worked from home.

Chinese markets reversed opening losses Monday to rise following the announcement. The Shanghai Composite (SHCOMP) gained 0.8%, while the Shenzhen Component Index — a benchmark for the city’s tech-heavy exchange — rose 1.6%. Hong Kong’s Hang Seng Index (HSI) increased 1%.

There are still some weak spots, though. Retail sales lost a little steam in December, rising 4.6% compared to November’s 5%. For the entire year, retail sales slumped 3.9%. Ning, the National Bureau of Statistics spokesperson, blamed the waning sales on a resurgence of coronavirus in some places.

The “sporadic” cases in China “will bring uncertainty to [our] economic recovery,” he added.

Even so, Ning said the country believes the pandemic is under control, and said authorities expect people to spend more money this year.

Analysts from Capital Economics, meanwhile, believe the outlook is “bright” in the near term.

“Despite the latest dip in retail sales, we see plenty of upside to consumption as households run down the excess savings they accumulated last year,” wrote Julian Evans-Pritchard, senior China economist for Capital Economics, in a Monday note. “Meanwhile, the tailwinds from last year’s stimulus should keep industry and construction strong for a while longer.”