The US trade deficit narrowed more than expected in July, as imports retreated and exports shot to their highest since August 2008, according to a government report that could lift hopes for third-quarter economic growth.

The monthly trade deficit shrank 14 percent to $42.8bn, which was smaller than the mid-point forecast of $47.3bn from economists surveyed before the Commerce Department report.

Exports rose to 1.8 percent to $153.3bn, led by strong overseas demand for US civilian aircraft, machinery, computers and other capital goods.

Imports fell 2.1 percent to $196.1bn, after a three percent rise in June that had caught many analysts by surprise and lowered estimates of second-quarter US growth. The drop in July was the largest since February 2009.

The dollar regained some ground against the Japanese yen after the favourable data on the US trade balance and a separate report showing fewer claims for jobless benefits.

Stock futures continued to gain after the reports.

Despite the improvement in the monthly trade gap, the cumulative deficit for the first seven months of 2010 rose to $288.83bn from $203.96bn in the same period in 2009.

In the second quarter of this year, a sharp widening in the trade gap sliced nearly 3.4 percent points off of US economic growth.

July imports from both China and Germany – two countries with persistent trade surpluses – were the highest since October 2008.

The closely watched trade deficit with China fell almost one percent in July, but for the first seven months of the year it was nearly 18 percent higher, at $145.4bn, compared to the same period in 2009.

With congressional elections looming in November and US unemployment a high 9.6 percent, US lawmakers are expected to turn their attention to China’s exchange rate practices when they return next week from their summer recess.

Many accuse Beijing of deliberately undervaluing its currency by as much as 40 percent to give Chinese exporters an unfair trade advantage.

However, the July increase in US  exports, including to China, is good news for President Obama’s administration, which has hoped healthy foreign demand will help put the US economy back on a strong footing. Obama has set a goal of doubling exports in five years.

Prices for imported oil fell slightly in July to an average of $72.09 per barrel, the second consecutive monthly decline.