Canada unexpectedly ran one of its smallest trade deficits in recent years in December on a sharp recovery in oil shipments after the completion of repairs on a pipeline.

The December gap fell to C$370 million ($279 million), down from a revised deficit of C$1.2 billion in November, Statistics Canada said Wednesday in Ottawa. Economists had forecast a deficit of C$610 million. It was largely an energy story, with shipments of crude up 18% during the month.

It’s the best trade reading since the country recorded a small surplus in May. Canada has averaged monthly trade deficits of C$1.8 billion over the past three years.

Canada’s struggling exporters had been one of the main reasons for the nation’s economic slowdown at the end of last year, so the December recovery in shipments could stoke hope the trade sector will contribute more to growth in future. But a prolonged period of sluggish imports, which persisted into December, continues to raise questions about weak domestic demand.

While exports jumped 1.9%, imports recorded just a 0.2% gain. Imports are down more than 5% since hitting 2019 highs in March. Industrial machinery and equipment dropped 4% in December, an indication businesses may be curtailing investment.

“The pullback is still not a good sign for near-term domestic demand growth,” Nathan Janzen, senior economist at RBC Economics, said in a note to investors.

Market Reaction

The currency dropped after the report, trading 0.1% lower at C$1.3293 against its U.S. counterpart at 10:20 a.m. Toronto time. Two-year government bond yields were up 3 basis points to 1.51%.

The export pick-up during the month erases a 1.9% decline in November, which had been hampered by a multi-day strike at CN Rail and the rupture of the Keystone pipeline in North Dakota. Excluding energy, gains were just 0.3%.

Even with the rebound in exports in the final month of 2019, which included a 2.8% jump in volumes, the trade sector looks to have been a major drag on growth in the fourth quarter. In volume terms, exports were down 2% in the fourth quarter, surpassing the 0.6% drop in imports.

For all of 2019, Canada recorded a deficit of C$18.3 billion, the smallest annual gap since 2014. That largely reflected sluggish imports, which were up 1% for the year. Exports rose 1.7% last year, well below 2018 gains of 6.3%.

The rise in oil exports widened the nation’s trade surplus with the U.S. to C$5.2 billion in December, from C$4.1 billion a month earlier.