OTTAWA -- Canada's trade deficit for November was smaller than economists expected as the country's trade surplus with the United States grew.

Statistics Canada said Wednesday that the country's trade deficit with the world narrowed to $2.0 billion in November from $2.5 billion in October.

Economists had expected a deficit of $2.6 billion, according to Thomson Reuters.

Imports fell 0.7% to $45.2 billion in November with the largest drop in electronic and electrical equipment and parts as well as energy products.

Meanwhile, total exports for the month rose 0.4% to $43.3 billion in November.

"Overall, this was a decent report, especially when looking at trade in real terms," TD Bank economist Dina Ignjatovic wrote in a report.

"The rise in export volumes is encouraging and combined with the strong handoff heading into the quarter, net trade should contribute positively to overall growth in the fourth quarter, albeit modestly."

Export volumes gained 0.7% as prices dropped 0.4%, while import volumes fell 1.6% as prices increased 0.9%.

Royal Bank assistant chief economist Paul Ferley said the report provided some tentative optimism that exports have returned to the positive growth column.

"Rising external demand for Canada's exports is a key area that is capable of offsetting the impact of declining energy investment resulting from the slide in oil prices over the past year," Ferley said.

"Optimism about external trade has been enhanced by the continued solid growth in the U.S. and a weakening Canadian dollar."

The Bank of Canada has been looking an improvement in exports to help drive an economy that has been hurt by lower commodity prices.

The central bank has said that it expects non-resources exports would be the "backbone" of growth, particularly as the U.S. economy strengthens.

Canada's trade surplus with the United States increased to $2.1 billion in November from $1.7 billion in October.

The increase came as exports to Canada's largest trading partner rose 1.3% to $32.5 billion in November, while imports edged down 0.1% to $30.4 billion.

Canada's trade deficit with countries other than the United States narrowed to $4.1 billion for November from $4.2 billion in October.