Canada exported more goods to the rest of the world than we brought from others in March, as the economy swung from a $1.2 billion trade deficit to a small, $24 million surplus.

Statistics Canada reported Thursday that Canada exported some $40.5 billion worth of goods and services in March. The trend in exports has been inching higher since July 2012, the data agency said.

The uptick in exports was more than enough to offset an increase in imports, which rose to $40.4 billion, their second highest level on record.

StatsCan credited higher exports of motor vehicles and car parts with the export bump, as well as higher exports of energy products. Canada shipped out 24.8 per cent more natural gas in March than the country did in February.