Canada’s trade deficit shrank in March but not as much as expected as exports, led by the energy sector, climbed higher.

Statistics Canada said Thursday the merchandise trade deficit for March amounted to $3.2 billion compared with $3.4 billion in February.

Economists had expected a deficit of $2.45 billion, according to Thomson Reuters Eikon.

“The headline trade deficit looked ugly in March, but the details were at least slightly prettier,” CIBC economist Royce Mendes wrote in a report.

Mendes said a slowdown in exports in the first quarter appears to have been partially tied to oil production restraint in Alberta.

“But, even outside of that sector, growth in outbound shipments has been sluggish in recent years, suggesting the need for a weaker Canadian dollar over the medium-term to increase Canada’s international competitiveness,” he said.

The growth came as exports of energy products rose 7.7 per cent to $9.6 billion in March and motor vehicles and parts gained 5.6 per cent at $7.7 billion.

Meanwhile, imports rose 2.5 per cent to $52.3 billion, as consumer goods posted the largest increase.

Imports of consumer goods rose 6.7 per cent in March to a record $10.9 billion, boosted by imports of clothing, footwear and accessories. Imports of motor vehicles and parts rose 4.9 per cent to $9.9 billion.

Breaking down the trade figures by region, Canada’s trade deficit with countries other than the United States hit a record $6.8 billion in March compared with $6.4 billion in February.

Exports to countries other than the United States rose 8.8 per cent in March to $12.7 billion, while imports from those countries rose eight per cent in March to $19.5 billion.

Meanwhile, Canada’s trade surplus with the United States increased to $3.6 billion in March from $3 billion in February.

Exports to the United States rose 1.3 per cent to $36.4 billion, while imports from the United States fell 0.4 per cent.