OTTAWA  -  Canada's hard-hit export sector showed unexpected signs of strength in October, posting the first increase since May on higher shipments to the United States while imports continued to disappoint.

As a result, Canada's trade deficit shrank to a five-month low of $1.47 billion from $3.36 billion in September, Statistics Canada said on Tuesday.

Analysts polled by Reuters had forecast a shortfall of $2.70 billion. The deficit was the lowest since the $1.02 billion seen in May.

Exports grew by 2.7 per cent - the biggest month-on-month increase since March - in part due to higher shipments of energy products to the United States to make up for a recent drawdown in refinery inventories. Nine of 11 export categories posted advances.

The data most likely came too late to influence the Bank of Canada. Analysts expect the central bank to keep interest rates unchanged when it unveils its next decision on Wednesday.

The central bank, which has long fretted about sluggish non-energy exports, says uncertainty surrounding the future of the North American Free Trade Agreement is one of the biggest risks facing Canada's exporters.

Jennifer Lee, senior economist at BMO Capital Markets, said that while the data showed encouraging signs, one month's figures did not make a trend.

"It will help them (the Bank of Canada) put a little bit more of a positive tone but I think overall they are going to sound cautious tomorrow, just given that NAFTA is the overriding piece of uncertainty right now," she said in a phone interview.

The Canadian dollar initially edged up after the data, rising to $1.2626 to the U.S. dollar, or 79.20 U.S. cents, from $1.2648, or 79.06 U.S. cents, before the data were released. It later gave up all the gains.

"We're finally seeing the rebound we've been waiting for months ... the good news is that the gains are broad-based," Stephen Tapp, deputy chief economist at Export Development Canada.

Imports dipped by 1.6 per cent on weaker demand for motor vehicles and parts amid work stoppages and planned shutdowns in the automotive industry.

Exports to the United States jumped 4.1 per cent, while imports slipped by 0.6 per cent. As a result, the trade surplus with the United States, which accounted for 74.9 per cent of Canadian goods exports in October, expanded to $3.52 billion from $2.02 billion in September.