Image caption Imports of cars and car parts were behind the rise in the August trade deficit

The US trade deficit widened in July as exports fell and the nation bought more cars and car parts from overseas.

The trade gap rose 13% to $39.1bn (£25bn) compared with June's $34.5bn, said the US Commerce Department.

Imports of cars, trucks, motoring parts and engines rose to a record $26.5bn. Much of that was supplied by US firms that have plants in Canada and Mexico.

July saw exports fall 0.6% from June's record level as sales of capital goods, such as aircraft and engines slowed.

However the trend shows that the trade gap is closing.

Including the July figures, the three month average fell to $39.1bn from $39.3bn.

Global pickup

Many economists expect that trend to continue this year as the global economy picks up and demand for US goods increases.

"We expect some narrowing in the trade deficit in the third quarter. It's consistent with some pickup in the global demand," said Yelena Shulyatyeva, an economist at BNP Paribas in New York.

The US continues to run a huge trade deficit with China, and in July it hit a record of $30.1bn.

It is a politically sensitive topic as many in the US say that Chinese firms have an unfair advantage as the government keeps its currency weak, which makes Chinese goods more competitive on the global market.

The weakness of European economies is also evident in the data which showed US exports to the European Union falling by 7.4% to $21.1 billion in July.