The U.S. trade deficit narrowed in April as both exports and imports tumbled, highlighting the impact of President Donald Trump’s tariffs even before negotiations with China unraveled and he threatened levies on Mexican goods.

The deficit in goods and services shrank to $50.8 billion, nearly in line with economist estimates, from a revised $51.9 billion the prior month, according to a Commerce Department report Thursday. The merchandise-trade gap with China increased to $29.4 billion while the Mexico deficit narrowed to $7.9 billion.

Exports fell the most in three years, partially reflecting lower demand for civilian aircraft following the worldwide grounding of Boeing Co.’s 737 Max model, though the decline in shipments abroad was broad-based. A narrower deficit overall will add to economic growth and allow Trump to claim some victory on pledges to reduce the gap, though it’s come at a cost to American companies that have lost export business or are paying higher prices.

“The shifting policies are really making it difficult for businesses to try to plan ahead and try to get their supply chains in order, and it’s most evident in these big fluctuations that you’re seeing in imports and exports on a monthly basis,” said Brett Ryan, senior U.S. economist at Deutsche Bank AG.

While it might not matter to Trump how a smaller deficit is achieved, “everybody loses” when trade is decreasing from all sides, Ryan said.

Goods shipments to China fell to $8.5 billion in April from $10.2 billion the prior month and are down 20% year-to-date, while imports from the nation have declined 13.2% in 2019.

Meanwhile, merchandise exports to Mexico are little changed so far this year while imports are up 6.1%, highlighting the diverging paths of U.S. trade with Mexico and China since Trump imposed the first wave of China tariffs in mid-2018.

What Our Economists Say

A considerable drop in trade volumes—both exports and imports—since last year is a cause for concern with respect to growth prospects for both domestic producers and consumers.—Yelena Shulyatyeva and Carl Riccadonna, economistsClick here for the full note.

Overall U.S. imports posted the biggest drop since January on declines in inbound chemicals, semiconductors, autos and consumer goods. Merchandise demand was the lowest in more than a year.

U.S. and Mexican negotiators were set to resume talks Thursday with time running short to avert Trump’s threat to impose tariffs next week. Trump, who’s traveling overseas, said that “not nearly enough” progress was made during a 90-minute meeting at the White House between officials from both countries.

The smaller overall trade gap suggests net exports were on track to contribute to economic growth in the second quarter, though if U.S. companies again boost imports to beat tariffs, it could weigh on the pace of expansion.

Thursday’s figures showed the deficit in goods narrowed to $71.7 billion, while the surplus in services increased to $20.9 billion.

A separate report from the Labor Department Thursday showed filings for unemployment benefits remained low last week ahead of Friday’s jobs report for May. Jobless claims were unchanged at 218,000 in the week ended June 1, slightly above economist forecasts.