The numbers: The trade deficit rose 7% in June to mark the first increase in four months, keeping the U.S. on track to post the largest annual gap in a decade even as the Trump White House escalates tariffs in an effort to bring it down.

The deficit climbed to $46.3 billion from a revised $43.2 billion in May, the Commerce Department said Friday. Economists polled by MarketWatch had forecast a $46.6 billion gap.

The U.S. trade deficit added up to $291 billion in the first six months of 2018, compared with $272 billion in the first half of 2017.

What happened: U.S. exports fell 0.6% to $213.8 billion just a month after hitting a record high. The biggest drop was in new cars and trucks. Exports of drugs, jewelry and passenger planes also declined.

Soybean exports surged again following a similar spike in May as buyers sought to stock up before retaliatory tariffs took effect.

Soybean shipments were nearly 50% higher in the first six months of this year as compared with the comparable period in 2017: $15.2 billion vs. $10.9 billion. Exports could soon taper off sharply, though, as the tariffs kick in.

Imports rose 0.6% to $260.2 billion. The U.S. imported more oil and pharmaceutical drugs. Oil imports were the highest in 3½ years.

Drug imports were significantly higher compared with a year earlier, in perhaps another case of pre-tariff buying.

Tariffs imposed by President Trump on foreign steel and aluminum appeared to have an effect. Imports of both metals sank in June.

Read:Why the U.S.-China trade deficit is so huge: Here’s all the stuff America imports

Big picture: Although Trump claimed last week that his administration had cut the trade deficit, it’s actually still going up.

Part of the reason is that the U.S. economy is doing well compared to other countries. Americans can afford to buy more imports. The rising value of the dollar has also made American exports more expensive for foreign customers to buy.

The U.S. has run trade deficits for years, and it’s unlikely that any president could quickly reduce them. The U.S. doesn’t even produce many of the goods, such as cellphones, that it imports from China in mass quantities.

An intensifying trade war with Chinese is a wild card, but most economists predict the trade gap will increase a bit faster in the second half of the year. If does, the annual deficit could surpass last year’s total of $552 billion and hit the highest level since 2008.

Read:Why Trump has tamped down trade tensions with Europe, but not China

A bigger trade deficit could reduce gross domestic product, the official yardstick of the U.S. economy.

What they are saying? “Exports will rise over the quarter, but strong domestic demand growth will lift imports more rapidly,” said chief U.S. economist Ian Shepherdson of Pantheon Macroeconomics.

Market reaction: The Dow Jones Industrial Average DJIA, +0.19% and the S&P 500 SPX, +0.29% rose slightly in Friday trades.

Early in the week the Dow had capped off a 5% increase over the past month to reach its highest level since February. Yet stocks have had a rockier time in the last few days amid intensifying trade tensions with China. China on Friday threatened to rap the U.S. with $60 billion in tariffs in response to early White House sanctions.