Canada's merchandise trade deficit with the rest of the world more than doubled to $931 million in July from $460 million in June as imports grew and exports fell.

The higher deficit came as a surprise. Bloomberg reported that its survey of 22 economists suggested the trade gap would narrow to $250 million.

Statistics Canada said imports rose 0.6 per cent to $40.1 billion on higher volumes of metal ores and non-metallic minerals, basic and industrial chemical, plastic and rubber products, and metal and non-metallic mineral products.

Exports fell by the same percentage to $39.2 billion. The agency said lower exports of aircraft, unwrought precious metals and precious metal alloys were largely to blame for the decrease.

Imports from the United States rose 2.7 per cent to $26.3 billion, while exports rose 0.8 per cent to $29.4 billion. That narrowed Canada's trade surplus with the U.S. to $3.2 billion from $3.6 billion in June.

Exports to other countries fell 4.5 per cent to $9.8 billion and imports decreased 3.1 per cent to $13.9 billion, leaving that trade deficit at $4.1 billion.

Canada hasn't recorded a trade surplus since December 2011.

Many economists said the report signalled a weak economic hand-off to the third quarter.

"The disappointing headline print for the monthly deficit is backed up by weak details that point to a poor start to [third-quarter] tracking of the economy’s growth prospects," said Scotia Capital Markets Economics vice president Derek Holt in a morning commentary.

"Because the hit was not in the sectors where one might think that Alberta’s flooding was focused, it is difficult to dismiss it as a one-off shock laden disappointment," he wrote.