The U.S. trade deficit grew in June for the first time in four months as imports increased and the value of shipments overseas declined against a backdrop of escalating tensions with America's trading partners.

The gap widened 7.3 per cent to US$46.3 billion from a revised US$43.2 billion in the prior month, Commerce Department data showed Friday.

The June figures capped an otherwise positive quarter for U.S. trade, as a narrowing of the deficit contributed the most to economic growth since 2013. While tariffs and the threat of retaliatory levies prompted a pickup in shipments of soybeans and some other materials, American exports of capital goods, vehicles and consumer goods declined in June, indicating trade may be of less help to the economy going forward.

Overall exports dropped 0.7 per cent to US$213.8 billion, despite record overseas shipments of petroleum and all industrial supplies and materials. Imports climbed 0.6 per cent to US$260.2 billion, boosted by pharmaceuticals, crude oil, chemicals and other industrial supplies.

The median estimate of economists surveyed by Bloomberg called for a June trade deficit of US$46.5 billion.

The trade gap data for July will be more closely watched for signs that developments related to President Donald Trump's trade policies are taking a toll on the economy.

Rising demand by U.S. households and businesses is expected to keep supporting purchases of foreign-made goods in coming months. At the same time, it is hard to predict how exports may perform, given that the headwinds from trade also are a risk to the outlook for the global economy. In addition, the dollar continues to strengthen.

The U.S. economy accelerated to a 4.1 per cent pace of growth in the second quarter, the fastest since 2014. A big boost came from net exports, which contributed 1.06 percentage points to growth, the most since 2013. That reflected a jump in shipments abroad of soybeans, up 40 per cent in the first half of the year compared with 2017, and petroleum and related products.

The report also showed the merchandise trade gap with China, the world's second-biggest economy, was little changed in June at US$32.5 billion after May's US$32 billion.

The trade deficit with Mexico widened to US$6.7 billion and the gap with European Union countries grew to US$12.8 billion.

Other Details

-After eliminating the influence of prices, which renders the numbers used to calculate GDP, the merchandise trade deficit grew to US$79.3 billion from US$75.5 billion in the prior month

-Real petroleum gap narrowed to US$12 billion from US$12.6 billion; excluding petroleum, the overall trade shortfall increased to US$42.1 billion

-Exports and imports of goods account for about three-fourths of America’s total trade; the U.S. typically runs a deficit in merchandise trade and a surplus in services