The numbers: The trade deficit rose in October to a 10-year high amid a record shortfall with China, keeping the U.S. on pace to record the largest annual gap in a decade.

The deficit edged up 1.7% to $55.5 billion from a revised $54.6 billion in September, the Commerce Department said Thursday. That’s the biggest shortfall since October 2008, and ironically, it stems in part from tariffs imposed by President Trump in an effort to reduce the deficit.

Economists polled by MarketWatch had forecast a $55.1 billion gap.

What happened: Imports rose 0.2% to a record $266.5 billion in October. The U.S. imported more autos, drugs and other consumer goods

Part of the recent surge in imports reflects American companies stocking up on Chinese goods ahead of the holidays to get ahead of another increase in U.S. tariffs that was supposed to kick in on Jan. 1. The U.S. tariff increase has been temporarily been postponed until March.

Exports slipped 0.1% to $211 billion, largely because of a big drop in soybean shipments. Retaliatory tariffs by China has curbed U.S. exports of big sellers such as soybeans.

The trade deficit with China in goods, meanwhile, rose again to a fresh all-time high of $43.1 billion. Exports to China are running slightly behind last year’s pace.

The trade gap has continued to widen despite punitive Trump administration tariffs meant to reduce Chinese imports and force the Asian giant to alter what the White House considers unfair trade practices.

The U.S. agreed last week to postpone another round of tariff increases to give the two countries 90 days to make progress in resolving trade conflicts, but the arrest on Wednesday of senior Chinese business executive in Canada could throw a kink into negotiations.

The U.S. trade deficit added up to almost $503 billion in the first 10 months of 2018. That compared to about $451 billion in the same span in 2017.

The last time the U.S. trade deficit was higher was in 2008, when it topped $700 billion.

Big picture: One reason the U.S. runs large trade deficits is because the economy is doing so much better compared to other countries. Americans simply can afford to buy more.

Yet the U.S. has also stopped producing many goods such as clothes and computers and it has to get them elsewhere. China is one of the largest suppliers for the U.S. and is likely to remain so for years even if the country can’t strike a trade agreement with President Trump, who referred to himself as “Tariff Man” in a tweet this week.

The big danger is that lingering trade tensions will raise costs for Americans businesses and consumers and damage the U.S. economy.

What they are saying?: “The widening in the trade deficit ... was mainly driven by a further plunge in exports to China, and suggests that net trade will once again be a drag on GDP growth in the fourth quarter,” said economist Andrew Hunter at Capital Economics.

Market reaction: The Dow Jones Industrial Average DJIA, -1.92% and S&P 500 SPX, -2.37% sank in Thursday trades after the arrest in Canada of a Chinese executive of the tech company Huawei at the request of the U.S.

Stocks also sank on Tuesday. The market was closed Wednesday for the funeral of former President George. H.W. Bush.