The trade deficit fell 7 per cent in June to a seasonally adjusted $41.5 billion, from $44.7 billion in May, the Commerce Department said Wednesday.
Exports rose 0.1 per cent to $195.9 billion, a record high. Imports fell 1.2 per cent, the most in a year, to $237.4 billion.
Imports of petroleum products fell, cutting the trade deficit in petroleum to its lowest in four years.
The unexpected decline suggests that growth may have been stronger in the second quarter than the government initially estimated. A lower trade deficit can boost economic growth when it shows Americans are buying more U.S. products and fewer overseas goods.
The economy grew at a 4 per cent annual rate in the April-June quarter, the government said last week. But that figure included an estimate of the June trade deficit that was higher than Wednesday's figure.
Ian Shepherdson, chief economist at Pantheon Macroeconomics, said in a note to clients that the deficit figures indicate growth may have been as high as 4.3 per cent in the second quarter. The government will revise its figure for the April-June quarter later this month.
Imports surged in the first four months of this year, pushing the trade deficit to a two-year high in April. A slowdown in imports was likely after the surge, economists said.
June's decline comes after the trade deficit was a huge drag on the economy earlier this year, slowing growth by 1.7 percentage points in the first quarter. The economy shrank at a 2.1 per cent seasonally adjusted annual rate in that quarter, the worst showing since the recession.
But the government estimates that the trade gap was a much smaller drag in the second quarter, subtracting 0.6 percentage points from growth.
The trade deficit has widened in the first six months of this year to $260 billion, up from $242.7 billion in the first half of 2013. While exports have increased, imports have risen even more. But higher imports suggest that consumers and businesses are spending more.
In 2013, the trade deficit declined by 11.4 per cent. That reflected in part a boom in U.S. energy production that cut into America's dependence on foreign oil, while boosting U.S. petroleum exports to a record high.
The nation's trade balance in oil has continued to improve this year. The U.S. had a petroleum trade deficit of $105.3 billion in the first half of this year, down from $125.7 billion last year.
The U.S. deficit with the 28-nation European Union narrowed 9 per cent in June from May to $11.2 billion, as exports to the region rose and imports fell. The gap with China, however, increased 4.5 per cent to $30.1 billion, as exports rose but imports increased by much more.