The U.S. trade deficit widened in August to the biggest in six months as soybean exports plunged and a measure of the gap with China hit a record, showing how the Trump administration’s trade war is dragging on economic growth.

The gap in goods and services trade increased 6.4 percent to $53.2 billion, from a revised $50 billion in the prior month, Commerce Department data showed Friday. Imports rose 0.6 percent and exports fell 0.8 percent. Soybean exports dropped $1 billion, or 28 percent, to $2.58 billion, reversing a run-up earlier this year ahead of retaliatory levies from China.

A widening trade deficit is set to drag on the economy in the third quarter after a narrower gap helped boost the pace of expansion in the prior period to the fastest since 2014. The latest figures show how President Donald Trump’s tariffs on goods from China and other nations, which have raised prices and disrupted some businesses, are starting to weigh on an otherwise solid pace of U.S. growth.

The median estimate of economists surveyed by Bloomberg called for a trade deficit of $53.6 billion. Preliminary figures last week had showed a wider trade gap in merchandise.

Exports fell to $209.4 billion, spanning declines in other items including crude oil and petroleum products. Imports rose to $262.7 billion, boosted by consumer goods and automobiles.

China, Mexico

Friday’s report showed the unadjusted merchandise-trade gap with China, the world’s second-biggest economy, widened to a record $38.6 billion, from $36.8 billion. The trade deficit with Mexico was a record $8.7 billion, following $5.5 billion.

The Trump administration imposed duties on $34 billion of Chinese goods in early July and another $16 billion in late August. That was followed by levies on $200 billion as of Sept. 24. Beijing has issued retaliatory duties each time, and Trump has threatened to ratchet up U.S. tariffs further.

At the same time, trade tensions have eased with Canada and Mexico. This week, the U.S. reached a deal with the two nations on a revised North American Free Trade Agreement. Trump plans to sign the new deal, to be renamed the U.S.-Mexico-Canada Agreement, by the end of November.