Canada's trade surplus with the rest of the world rose to $4.1 billion in August as imports fell back from record levels the month before.

The surplus in July was revised lower to $3.4 billion. Analysts had expected August's surplus to rise to $3.8 billion.

Imports dropped 3.9 per cent to $34.4 billion. It was the first drop in imports since May. Shipments of auto parts from the U.S. into Canada fell to their second lowest level in 10 years, Statistics Canada said.

"Despite the considerable appreciation of the Canadian dollar against the American dollar since the beginning of 2007, August's decrease in imports was the result of widespread declines in all sectors except energy products and agricultural and fishing products," the agency said.

Exports also fell last month, but by only 1.8 per cent. That allowed the trade surplus to widen. Canadian shipments of industrial goods and materials fell by nine per cent, while exports of automotive products dropped by six per cent.

Canada's trade surplus with the United States widened by $200 million to $6.7 billion.

Year-over year, Canada's exports to the U.S. have fallen by 3.2 per cent as the rising Canadian dollar makes Canadian goods even more expensive for U.S. buyers.

The loonie was trading at a new 31-year high of $1.0236 US in morning trading Thursday, up a third of a cent from Wednesday's close.