Canada posted a narrower-than-expected trade deficit of C$370 million ($279 million) in December, largely on higher crude exports, official data showed on Wednesday.
Analysts polled by Reuters had forecast a shortfall of C$610 million. Statscan revised the November deficit to C$1.20 billion from an initial C$1.09 billion.
The value of exports increased 1.9 percent in December to C$49.32 billion, with gains in eight of the 11 product sections tracked by Statscan. Imports edged up 0.2 percent, with advances in five of the 11 product sections.
"It's a nice bounce back, a modest bounce back in what was a very challenging year for Canadian exports in 2019," said Ross Prusakowski, principal economist with Export Development Canada, in a phone interview.
"We saw the recovery from the transportation challenges that we had in November with the rail strike as well as the pipeline outage, so it's obvious the recovery is there, especially on the energy side," he said.
The Canadian dollar was trading at C$1.3283, or 75.28 US cents, after the data was released.
Statscan said exports of energy products jumped 9.5 percent in December, with crude oil exports surging 18.0 percent following the repair of a rupture in the Keystone pipeline in North Dakota.
Canada's ongoing trade row with China, that has seen Beijing block Canadian canola seed exports because of disputed pest concerns, also appeared to be taking a toll.
Statscan said on Wednesday overall exports to China were down 16.0 percent in 2019, the first annual decline since 2014, largely on lower canola and soybean shipments.
Meanwhile, Canadian exports to the United States rose 2.9 percent, mainly due to crude exports, while imports from the United States were down 0.2 percent, the fourth consecutive monthly decline.
Statscan said Canada's trade surplus with the United States, its largest trading partner, widened to C$5.2 billion in December.
About 75 percent of Canada's goods exports are sent to the United States.
The Bank of Canada has held its overnight interest steady for more than a year even as several of its counterparts have eased, but in January left the door open to a possible rate cut if a recent slowdown in domestic growth persists.
Market expectations, as reflected in the overnight index swaps markets, show operators expect the Bank to hold rates again in March.