Record imports in October drove the U.S. trade deficit to the highest level in a decade.

The Commerce Department said Thursday that the gap between what the United States sells and what it buys from foreign countries rose to $55.5 billion in October, the fifth straight increase and the highest since October 2008.

The politically sensitive deficit in the trade of goods with China rose 7.1% to a record $43.1 billion. The goods gap with the European Union widened 65.5% to a record $17.6 billion.

Led by shipments of medicine and cars, overall imports rose 0.2% to a record $266.5 billion. Exports fell 0.1% to $211 billion.

President Donald Trump campaigned on a pledge to slash America's trade deficit. But the deficit this year is running 11.4% above January-October 2017.