OTTAWA - Canada's trade surplus with the world narrowed to C$2.49 billion in March from February, missing analyst expectations, as both imports and exports surged to record highs, data from Statistics Canada showed on Wednesday.

Exports jumped 6.3% to C$63.63 billion, driven mostly by high prices for energy products. Imports were up 7.7% to C$61.14 billion, with gains in nine of 11 product categories. Both imports and exports came in higher than analysts had forecast.

Energy products accounted for 28.2% of total exports, with crude oil exports up 14.8%, entirely due to higher prices, Statscan said. Excluding energy products, exports were up 4.0%.

"Market prices for crude oil ... were up substantially on average in March, as the conflict in Ukraine and sanctions against Russia raised the level of uncertainty surrounding global supply," Statscan said.

Exports of motor vehicles and parts also climbed, as supply chain bottlenecks that have weighed on vehicle manufacturing eased. Imports of motor vehicles and parts also rose, with two-way auto sector trade at its highest level since August 2019 on a not seasonally adjusted basis.

Canada's trade surplus with the United States hit an all-time high of C$12.6 billion, while its trade deficit with the rest of the world hit a record C$10.1 billion.

The Canadian dollar was trading 0.2% higher at 1.2811 to the greenback, or 78.06 U.S. cents. 

(Reporting by Julie Gordon in Ottawa, additional reporting by Dale Smith in Ottawa and Fergal Smith in Toronto, Editing by Paul Simao)