OTTAWA (Reuters) – Canada recorded a surprise trade surplus of C$1.9 billion ($1.38 billion) in January, driven by broad-based gains in exports, while imports posted a smaller increase led by motor vehicles and parts, Statistics Canada said on Wednesday.

Analysts had forecast a trade deficit of C$60 million in January. Statscan also revised December’s trade figures to a surplus of C$1.2 billion from an initial C$160 million deficit.

Total exports rose 4.2% in January on the back of gains in all product categories that more-than offset a fall in energy products exports. Excluding energy, exports rose 6.1% to an all-time high of C$51.6 billion.

Farm, fishing and intermediate food products, motor vehicles and parts, and metal and non-metallic mineral products all contributed roughly equally to the rise in exports, Statscan said. By volume, total exports were up 5.3% in January.

Imports increased 3.1% after two consecutive monthly declines, largely driven by motor vehicles and parts as well as industrial machinery, equipment and parts. Imports of consumer goods also contributed with a 3.8% rise in January, after three months of declines.

By volume, total imports were up 4.1%.

The Canadian dollar was trading 0.1% lower at 1.3765 to the greenback, or 72.65 U.S. cents, which was near its weakest level in four months.

($1 = 1.3760 Canadian dollars)

(Reporting by Ismail Shakil; Additional reporting by Fergal Smith in Toronto and Dale Smith in Ottawa; Editing by Mark Potter)