The US trade deficit narrowed in March for the first time in seven months as exports reached the highest level on record, the Commerce Department reported today.

The drop in the trade gap could point to higher growth in the first quarter than previously expected and comes as President Donald Trump pursues a fraught two-front trade confrontation with the European Union and China.

Rising exports of petroleum, which has seen prices increase recently, and of agricultural staples, combined with a steep drop in imports sent the monthly US trade deficit plunging to $49 billion, a 15.2%  drop from February, the biggest decrease in more than two years.

However, the deficit was still up 18.5 percent in the first quarter compared to the same period last year, at $25.5 billion.

"These data confirm ... that exports rebounded at the end of Q1 and imports fell sharply, starting to reverse the surge which followed the hurricanes last summer, when wholesalers and retailers had to rebuild inventory very quickly," Ian Shepherdson of Pantheon Macroeconomics said in a client note.

US exports of goods and services hit $208.5 billion, a new record, driven upwards by mounting exports of crude oil and other fuels as well as civilian aircraft and crops like soybeans, on which China has threatened to impose tariffs in response to punitive US duties on Chinese goods.

On the import said, Americans paid less to foreign companies for the licensing of intellectual property, and bought fewer foreign-made televisions, semiconductors and computers, helping drive US imports down 1.8 percent for the month to $257.5 billion.

Imports of foreign autos, however, hit a record $31.3 billion.

The goods deficit with China fell 11.5 percent from February to $25.8 billion, not seasonally adjusted.

Imports from Mexico, which is locked in tense trade negotiations with the Trump administration, also hit a record at $30 billion, sending the US deficit with Mexico in goods alone to a record $8.1 billion, up from $6 billion in the prior month.

Exports to Canada, also a partner in the North American Free Trade Agreement, were the highest since October 2014 at $28.4 billion, for a trade surplus of $306 million for goods only, compared to a $404 million deficit in February.