Statistics Canada says merchandise exports rose 4.5 per cent in December and imports edged up 0.8 per cent, pushing the country's trade surplus with the rest of the world to $2.7 billion from $1.2 billion in November.

The agency says exports grew to $42 billion in December as volumes increased 4.9 per cent, continuing an upward trend that began last July.

The value of exports increased in all sectors, led by machinery and equipment.

Imports increased to $39.3 billion as volumes rose 1.2 per cent. The increase was mainly a result of industrial goods and materials as well as automotive products.

U.S. trade grows

Exports to the United States rose 5.3 per cent to $30.2 billion with higher shipments of crude petroleum, aircraft and precious metals, while imports increased 2.8 per cent to $24.7 billion.

Both exports and imports posted their highest levels since October 2008.

The trade surplus with the United States grew to $5.5 billion in December from $4.7 billion in November.

Exports to countries other than the United States increased 2.5 per cent to a record high of $11.8 billion. Imports from countries other than the United States fell 2.6 per cent to $14.7 billion, a result of lower imports from the European Union.    The trade deficit with countries other than the United States narrowed to $2.9 billion from $3.5 billion in November.

It was the lowest deficit since December 2010.

Ending 2011 "with a bang"

The increased trade surplus pushed estimates for Canada's fourth quarter GDP growth even higher, with TD Bank expecting 2.0 per cent to 2.5 per cent annualized growth.

There was cause for concern, however, given the Canadian export sector's reliance on the U.S. economy.

"How the U.S. fares will be the critical factor for Canadian exporters," TD Bank economist Francis Fong, attributing the surprise results to strength in the U.S.

"Our largest trading partner has been faring much better than expected in recent months and this was obviously reflected in today’s gain."

Machinery exports grow

Exports of machinery and equipment grew 9.2 per cent to $7.5 billion in December, the highest level of exports since March 2009. Shipments of aircraft, engines and parts led the gain.

Exports of industrial goods and materials rose 3.8 per cent to $10.5 billion in December. Shipments of precious metals and alloys, other fabricated materials, as well as iron ores, concentrates and scrap led the gain.

Shipments of auto products were up 6.7 per cent to $5.8 billion, the highest level since November 2007.

Passenger autos and chassis led the overall increase, posting a fourth consecutive monthly gain as a result of higher volumes.

Energy exports 1.7 per cent to $10.3 billion, with crude petroleum exports hitting as record high of $6.9 billion.

Imports of industrial goods and materials grew 2.6 per cent to $8.6 billion in December. Imports of automotive products rose 3.6 per cent to $6 billion on higher volumes. Imports of machinery and equipment increased 1.3 per cent to $10.9 billion.

Energy imports fell 7.5 per cent to $4.3 billion, the only sector to decrease in December. It was the second consecutive monthly decrease in the sector.

with files from CBC News