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 is also accelerating. China’s economy grew 6.5% in the fourth quarter compared to a year earlier, according to the government. That’s faster than the 4.9% growth recorded in the third quarter.

Restaurants are filling up while cinemas and retailers struggle to lure customers back. Crowds are thin at shopping malls, where guards check visitors for signs of the disease’s tell-tale fever.

Domestic tourism is reviving, though authorities have urged the public to stay home during the Lunar New Year holiday in February, normally the busiest travel season, in response to a spate of new infections in some Chinese cities.

Exports have been boosted by demand for Chinese-made masks and other medical goods.

The growing momentum “reflected improving private consumption expenditure as well as buoyant net exports,” said Rajiv Biswas of IHS Markit in a report. He said China is likely to be the only major economy to grow in 2020 while developed countries and most major emerging markets were in recession.

The economy “recovered steadily” and “living standards were ensured forcefully,” the National Bureau of Statistics said in a statement. It said the ruling party’s development goals were “accomplished better than expectation” but gave no details.

2020 was China’s weakest growth in decades and below 1990’s 3.9% following the crackdown on the Tiananmen Square pro-democracy movement, which led to China’s international isolation.

Despite growth for the year, “it is too early to conclude that this is a full recovery,” said Iris Pang of ING in a report. “External demand has not yet fully recovered. This is a big hurdle.”

Exporters and high-tech manufacturers face uncertainty about how President-elect Joseph Biden will handle conflicts with Beijing over trade, technology and security. His predecessor, Donald Trump, hurt exporters by hiking tariffs on Chinese goods and manufacturers including telecom equipment giant Huawei by imposing curbs on access to U.S. components and technology.

“We expect the newly elected U.S. government will continue most of the current policies on China, at least for the first quarter,” Pang said.

The International Monetary Fund and private sector forecasters expect economic growth to rise further this year to above 8%.

China’s quick recovery brought it closer to matching the United States in economic output.

Total activity in 2020 was 102 trillion yuan ($15.6 trillion), according to the government. That is about 75% the size of the $20.8 trillion forecast by the IMF for the U.S. economy, which is expected to shrink by 4.3% from 2019. The IMF estimates China will be about 90% of the size of the U.S. economy by 2025, though with more than four times as many people average income will be lower.

Exports rose 3.6% last year despite the tariff war with Washington. Exporters took market share from foreign competitors that still faced anti-virus restrictions.

Retail spending contracted by 3.9% over 2019 but gained 4.6% in December over a year earlier as demand revived. Consumer spending recovered to above the previous year’s levels in the quarter ending in September.

Online sales of consumer goods rose 14.8% as millions of families who were ordered to stay home shifted to buying groceries and clothing on the internet.

Factory output rose 2.8% over 2019. Activity accelerated toward the end of the year. Production rose 7.3% in December.

Despite travel controls imposed for some areas after new cases flared this month most of the country is unaffected.