Canada's international trade deficit spiked unexpectedly as exports to the U.S. dropped, a side effect of the country's dependence on the struggling American economy.

The country's trade deficit jumped to $2.7 billion in July from $1.8 billion in June, Statistics Canada reported Thursday.

The numbers show how much Canada relies on its largest trading partner, even as the U.S. grapples with a slow economic recovery.

Exports to the United States dropped 2.2 per cent, while imports grew 2.9 per cent, narrowing Canada's trade surplus with the U.S. to $1.2 billion in July from $2.4 billion in June.

Exports to countries besides the U.S. increased by 3.7 per cent, buoyed by higher exports to the European Union, the agency reported. Imports rose by 0.2 per cent.

Canada's trade deficit with countries other than the U.S. fell to $3.9 billion in July from $4.2 billion in June.

Overall, merchandise exports decreased by 0.7 per cent in July as most sectors saw a decline in volumes, Statistics Canada said. Imports grew two per cent in the same period.

Exports dropped from $33 billion in June to $32.8 billion in July, the fourth decreased in six months, the agency said.

Exports fell in all export sectors except industrial goods and materials, declining 0.6 per cent overall. At the same time, export prices crept down 0.2 per cent.

Machinery and equipment, other consumer goods and forestry products spurred the decline in the value of exports. Growth in exports of industrial goods and materials helped offset the drop.

Imports shot from $34.9 billion in June to $35.5 billion in July, the highest recorded since November 2008. The change marked the fourth increase in six months.

Import volumes were up 1.4 per cent. Prices rose 0.6 per cent.

Energy products made up more than half the growth in all imports, with automotive products and machinery and equipment also playing a role. Imports of industrial goods and materials waned.

With files from The Canadian Press