OTTAWA -- Canada posted its first trade surplus in a year as exports surged and evidence mounted rising U.S. demand has started to lift Canada's economy out of the doldrums.

Statistics Canada reported Thursday exports increased 5.1 per cent to $40.5 billion for March -- while imports rose just 1.7 per cent to $40.4 billion -- helping end a year of sometimes massive trade deficits that had undercut the economic recovery.

Exports to the United States were responsible for three-quarters of the story, rising four per cent to $29.5 billion.

The net trade surplus was modest at $24 million, but came on the heels of a $1.2-billion deficit in February and a string of negative balances dating back to March 2012 when the country posted its last surplus. As well, exports recorded the sharpest one-month gain in real terms since July 2011 and reached the second-highest level since the recession.

"The trade picture in the first quarter of 2013 certainly paints the story of an economy moving away from domestic demand driven growth, to one where the economic engines are being fuelled by trade," said TD Bank economist Diana Petramala in a note to clients.

"Historical revisions, in combination with March's gain, puts net trade on track to contribute strongly to economic growth in the first quarter of 2013. All said, Canadian economic growth is likely to come in north of two per cent in the first quarter."

The export strength was broad-based with all sectors posting gains, led by a 6.1 per cent bump in shipments of motor vehicles and parts, along with a 3.9 per cent increase in energy products, mostly from a stunning 25 per cent uptick in natural gas exports.

Canada's trade surplus with the U.S. expanded to $3.8 billion from $3.2 billion in February as imports only rose a modest two per cent.

Exports to other countries also posted a large gain, rising 7.9 per cent to $11 billion, while imports from those countries rose 1.2 per cent, to $14.8 billion. That cut the trade deficit with those markets to $3.8 billion from $4.4 billion in February.

Export Development Canada chief economist Peter Hall said Canada was finally realizing the benefits of stronger economic growth south of the border, which was previously being sabotaged by the unusual factors -- hurricane Sandy and uncertainty over government spending levels as a result the fiscal cliff and sequestration negotiations.

The EDC has banked on exports rising by eight per cent this year, albeit coming off a poor 2012, but Hall said Canadians should not expect the same level of growth that occurred in March going forward.

"This is a bit of a payback month but we can't expect this kind of growth to persist. There's not enough strength in the U.S. to have repeated months with an over-the-top growth rate like this," he said.

"The U.S. import numbers for March were soft and that's going to have a bearing on Canadian trade as well ... but we do believe the numbers will continue to be strong."

The trade data is particularly welcome news for the Canadian economy, which many believe must transition from an over-reliance on domestic consumption fuelled by household borrowing to one buttressed by exports and business investment. The Bank of Canada has bluntly declared that both must improve for the economy to grow at even a modest pace.

But Petramala says she expects the transition will continue to be "bumpy," also noting that early indicators suggest U.S. demand is likely to cool in the near term.

The trade data was the second welcome economic report of the week after several months of mostly disappointing news.

On Tuesday, Statistics Canada reported the Canadian economy advanced by 0.3 per cent in both January and February, the best back-to-back monthly performances in more than a year.