Statistics Canada says the country's merchandise exports grew by 1.4 per cent in July, while imports edged down 0.3 per cent.
This raised the country's Canada's trade surplus with the world to $2.6 billion from $1.8 billion in June. Economists had expected a surplus of about $1.2 billion, according to Thomson Reuters.
Exports rose to $45.5 billion, led by motor vehicles and parts, while imports edged down to $43 billion, with lower imports of aircraft, other transportation equipment and parts and consumer goods, as well as metal and non-metallic mineral products.
Exports to the United States rose 1.9 per cent to $34.4 billion and imports rose 1.2 per cent to $29.2 billion, pushing the trade surplus with that country to $5.1 billion from $4.9 billion in June.
Shipments to countries other than the United States edged up 0.1 per cent to $11.2 billion, while imports from those countries declined 3.2 per cent to $13.7 billion.
The trade deficit with those countries narrowed to $2.6 billion from $3 billion in June.