BEIJING (AP) -- China's trade surplus swelled to a record $877.6 billion last year as exports rose despite weakening U.S. and European demand and anti-virus controls that temporarily shut down Shanghai and other industrial centers.
Exports increased 7% from a year earlier to $3.95 trillion, decelerating from 2021's explosive 29.9% gain, customs data showed Friday. Imports edged up 1.1% to 2.7 trillion, cooling from the previous year's 30.1% rise as economic growth slowed and consumer spending weakened.
The country's politically volatile global trade surplus expanded by 29.7% from 2021's record, already the highest ever for any economy.
"China's foreign trade and exports showed strong resilience in the face of many difficulties and challenges," said a customs agency spokesperson, Lu Daliang, at a news conference.
Export growth slumped late in the year after the Federal Reserve and other central banks raised interest rates to cool record-setting inflation by slowing economic activity.
December exports fell for a third month, contracting by 10.1% from a year earlier to $306.1 billion. That was bigger than November's 9% slide.
Last year's exports to the United States edged up 1% over 2021 to $581.8 billion despite tariff hikes by President Joe Biden's predecessor, Donald Trump, that still are in place on many goods. Chinese imports of American goods declined 1% to $177.6 billion.
China's annual trade surplus with the United States, one of the irritants that prompted Trump to hike tariffs, widened by 1.8% from 2021 to $404.1 billion.
Forecasters expect Chinese export growth to weaken further as the possibility of recession in Western economies increases. Some expect this year's exports to shrink.
"China's exports are likely to contract until the middle of the year," Julian Evans-Pritchard of Capital Economics said in a report this week.
Earlier in 2022, trade also was hampered by anti-virus controls that shut down Shanghai and other industrial centers in March for up to two months, disrupting manufacturing and global shipping.
In December, exports to the United States fell 19.5% from a year earlier to $301.1 billion. Imports of American goods shrank 7.3% to $228.1 billion. That produced a $78 billion surplus, down 17.5% from a year earlier.
Exports to the 27-nation European Union tumbled 39.5% to $43.6 billion. Imports of European goods fell 31.3% to $24 billion. China's trade surplus with Europe fell 50% to $19.6 billion.
"Downward pressure on the world economy is increasing," warned the customs agency's Lu.
Also in December, Chinese imports from Russia, mostly oil and gas, rose 8.3% over a year earlier to $9 billion.
China, the biggest global energy consumer, has stepped up purchases from Russia to take advantage of price discounts after Washington, Europe and Japan cut imports to punish President Vladimir Putin's government for its attack on Ukraine.
China can buy Russian oil and gas without triggering Western sanctions, but Biden has warned Beijing against helping Moscow's military. China bought about 20% of Russia's crude exports in 2021 and increased that last year.
China's December imports of oil, food, industrial components and consumer goods shrank 7.3% to $228.1 billion.
Business and consumer activity is starting to rebound following the ruling Communist Party's surprise decision to lift anti-virus controls that kept millions of people at home and blocked most travel into and out of China.
Activity has been temporarily dampened by a surge in COVID-19 infections that forced some factories, restaurants and other businesses to close due to lack of healthy workers. Wary consumers are returning only gradually to shopping malls and restaurants.
The economy also is under pressure from tighter controls on debt, which triggered a slump in the country's vast real estate industry.
Manufacturing activity weakened in December and new export orders contracted for a fifth month, according to a survey by a leading business magazine, Caixin. Auto sales fell 6.7% from a year earlier. Housing sales and retail spending are down.
Authorities say the peak of the infection wave might have passed in Beijing and other major cities.
A revival in Chinese demand would be a boost to global suppliers at a time when U.S., Europe and Japanese sales are weakening. China is the biggest export customer for its Asian neighbors and a key consumer market.
Economists say the only comparison for China's vast trade surplus as a percentage of its economy was Saudi Arabia and other oil exporters during their 1970s price boom, but their total revenues were smaller.
The swollen surplus has strained the ability of China's central bank to manage the exchange rate of its yuan, which rose to multi-year highs against the U.S. dollar as money flowed into the country.
The People's Bank of China responded by ordering banks to keep the exchange rate stable and trying to limit the ability of traders to speculate on the currency's movement.