China’s trade surplus surges to new heights.

All over the world, families finding themselves with more time at home because of the pandemic have responded by buying more furnishings, consumer electronics and other goods made in China.

Those purchases pushed China’s trade surplus to its highest level ever last year, according to data released on Friday by the Chinese government. The country’s surplus in December also shattered by a wide margin the record for the highest single month, set only two months earlier.

China’s trade surplus reached $94.5 billion in December, breaking the previous record of $84.5 billion, set in October. The country’s trade surplus for all of last year climbed to $676.2 billion.

China has carefully managed its trade in recent years. Xi Jinping, the country’s leader, has called for China to become more self-reliant and avoid dependence on imports.

Beijing has particularly focused on developing globally competitive manufacturing industries while importing mostly raw materials, so as to create as many well-paid jobs as possible within China’s borders. The government has also focused during the pandemic on helping Chinese companies become more competitive, while avoiding subsidies for consumers.

By contrast, governments in the West have put more emphasis on providing direct subsidies to consumers, who have used part of the money to buy more manufactured goods from China.

Chinese officials on Friday applauded the latest trade data, saying that it fulfilled the country’s goals. “In general, the 14th Five-Year Plan foreign trade has achieved a good start,” Li Kuiwen, the director of the Statistics and Analysis Department of China’s General Administration of Customs, said at a news conference in Beijing.

At the same time, a widening trade deficit with China has become a serious drag on growth in the United States and the European Union and has become a source of political friction.

Nearly half of China’s trade surplus in December was with the United States. The bilateral imbalance in December was $39.2 billion, slightly trailing the previous record of $42 billion, set in September.

President Donald J. Trump concluded a Phase 1 trade agreement in January 2020 that called for a sharp increase in China’s imports from the United States in 2020 and 2021, followed by further increases from 2022 through 2025. China fell short of the promised increases in the first two years of the agreement. Chinese experts have said that the pandemic interfered with normal trade flows.

China will not release until Monday its full-year statistics on total economic output. But estimates by Western economists, based on data through November, indicate that the widening of the trade surplus is now the main engine keeping China’s economy going, as real estate and other sectors falter.