Statistics Canada says rebounding merchandise exports turned a trade deficit into a surplus in November.
The agency says exports increased 3.2%, while imports declined 0.8%, turning an October trade deficit of $487 million into a November surplus of $1.1 billion.
Exports rose to $40.1 billion, with gains in most sectors.
Imports slipped to $39 billion, mainly because of lower imports of automotive products, as well as industrial goods and materials.
The trade surplus with the United States rose to $4.6 billion in November from $3.5 billion in October.
The trade deficit with countries other than the United States narrowed from to $3.5 billion in November from $4 billion in October.
Exports to non-U.S. destinations rose 6.7% to $11.5 billion, mainly the result of higher exports to the European Union.
Imports from those countries increased 1.3% to $15 billion, the fourth consecutive monthly gain.
Exports to the United States rose 1.9% to $28.6 billion, on the strength of energy products.
Imports from the United States declined two per cent to $24 billion, largely because of lower shipments of automotive products.
Overall, exports of energy products increased 6.4% to $10 billion in November, with shipments of crude petroleum up for a fourth consecutive month to a record high of $6.4 billion.
Exports of industrial goods and materials rose four per cent to $10.2 billion in November on higher volumes of precious metals and alloys, as well as other crude non-metallic minerals.
The increase was partially offset by a decline in volumes of fertilizers and fertilizer materials.
Exports of automotive products increased for a third consecutive month in November, rising 4.9% to $5.3 billion.
Imports of auto products, industrial goods and materials and metals and metal ores were all lower in November.
Imports of energy products increased two per cent to $4.6 billion.