Canada's merchandise trade surplus was at a 13-month high of $6.3 billion in January with exports at a record tally, Statistics Canada said Friday.   

Most economists had expected the surplus to drop because of January's lower energy prices and a weaker auto sector.

But exports rose for the third straight month, hitting an all-time high of $40.8 billion as Canadian exporters boosted shipments of machinery and equipment. Rising metals prices also helped to push up exports.

Imports fell in almost every sector except agriculture and fishing products.

Canada's trade surplus with the United States rose to $8.7 billion — the highest in a year. Canada also recorded its first trade surplus with the EU since December 1995. 

Analysts called it a positive report.

"This report adds to the mounting evidence that Canada's trade sector has begun to turn a corner, after facing more than its fair share of challenges, including a rapidly appreciating currency and decelerating demand from the United States," said TD Bank economist David Tulk in a commentary. 

U.S. trade deficit narrows

The U.S. said it set an export record in January and imports declined, helping to narrow its trade deficit to $59.1 billion US.

That's slightly better than the $59.7 billion US deficit forecast by economists.

Exports rose 1.1 per cent to $126.7 billion US on higher shipments of airplanes, computers and farm products.

The politically-sensitive U.S. trade deficit with China jumped 12 per cent to $21.3 billion US.

The U.S. trade deficit in 2006 came to a record $765.3 billion US.