STR/AFP/Getty Images
U.S. imports from China, ranging from clothes to Apple iPhones, rose to a record high in October.

The numbers: The trade deficit rose 1.7% 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 to $55.5 billion from a revised $54.6 billion in September, the Commerce Department said Thursday. That’s the biggest deficit since October 2008.

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

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

Exports slipped 0.1% to $211 billion. Shipments of industrial supplies increased, but exports of soybeans and airplanes fell.

The trade deficit with China in goods rose again to a fresh all-time high of $43.1 billion.

The 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 the Trump White House.

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

Market reaction: The Dow Jones Industrial Average DJIA, -3.10% and S&P 500 SPX, -3.24% were set to open sharply lower in Thursday trades after the arrest of a Chinese executive in Canada at the request of the U.S.

Stocks sank on Tuesday on worries over whether the U.S. economy will slow and doubts about a temporary trade truce with China. The market was closed Wednesday for the funeral of former President George. H.W. Bush.

The 10-year Treasury yield TMUBMUSD10Y, -1.07% slipped to 2.91%. Yields have tumbled from a seven-year high of almost 3.25% just one month ago.