The United States trade deficit surged to a 10-year high in 2018, with the politically sensitive shortfall with China hitting a record peak, despite the Trump administration slapping tariffs on a range of imported goods in an effort to shrink the gap.

The US Department of Commerce said on Wednesday that an 18.8 percent jump in the trade deficit in December had contributed to the $621bn shortfall last year. The 2018 deficit was the largest since 2008, and followed a $552.3bn gap in 2017.

The trade deficit has deteriorated despite the White House’s protectionist trade policy, which President Donald Trump said is needed to shield manufacturers in the US from what he says is unfair foreign competition.

The US last year imposed tariffs on $250bn worth of goods imported from China, with Beijing hitting back with duties on $11bn worth of American products, including soya beans and other commodities.

Trump has delayed tariffs on $200bn worth of Chinese imports as negotiations to resolve the eight-month trade war continue.

The US has also slapped duties on imported steel, aluminium, solar panels and washing machines. The goods trade deficit with China increased 11.6 percent to an all-time high of $419.2bn in 2018. The US had record imports from 60 countries in 2018, led by China, Mexico and Germany. Imports of goods hit a record $2.6 trillion last year.

An acceleration in economic growth in 2018 from Trump’s debt-funded tax cuts helped to boost the appetite for foreign goods.

The December trade deficit of $59.8bn was the largest since October 2008, and overshot economists’ expectations for a $57.9bn shortfall, as exports fell for a third straight month and imports rebounded. The release of the December report was delayed by a 35-day partial shutdown of the government that ended on January 25.

When adjusted for inflation, the goods trade deficit surged $10bn to a record $91.6bn in December. The jump in the so-called “real goods” trade deficit suggests that trade likely drained the fourth-quarter gross domestic product more than initially estimated by the government.

The government reported last week that trade subtracted 0.22 of a percentage point from GDP growth in the fourth quarter. The economy grew at a 2.6 percent annualised rate in the October-December quarter, slowing from the third quarter’s brisk 3.4 percent pace of growth.

The downbeat trade data – along with weak retail sales, construction spending, housing starts and business spending on equipment – set the economy on a low-growth trajectory in the first quarter.