OTTAWA -- Fresh figures from Statistics Canada show the country had a record trade deficit in April and that it was nearly as bad in May, raising concerns economic weakness in the second quarter could be worse than feared.

The federal agency said Wednesday the trade deficit in May was $3.28 billion and revised the deficit for April to a record $3.32 billion. That compared with its initial estimate of a $2.93 billion shortfall for April.

Economists had expected a trade deficit of $2.7 billion for May, according to Thomson Reuters.

Bank of Montreal senior economist Benjamin Reitzes called the trade report, which showed a 2.3 per cent drop in export volumes, "very downbeat."

"The string of declines in export volumes is a worrying sign that the transition away from energy sector-driven growth might be stalling," Reitzes wrote in a report.

"Add on the uncertainty surrounding the global economic outlook following the Brexit vote and Canadian trade will likely have trouble gaining meaningful traction in the near term."

Overall, exports fell 0.7 per cent to $41.1 billion in May, while exports excluding energy products declined 1.8 per cent. Imports slipped 0.8 per cent to $44.4 billion.

The bigger than expected trade deficit came as exports of crude oil and bitumen grew despite the wildfires in Fort McMurray, Alta., that forced several oilsands operations to shut down production. By some estimates, more than one million barrels per day of crude production was knocked offline -- about 40 per cent of all Canadian oilsands output.

Based on preliminary evidence, Statistics Canada said refinery activity slowed in May, freeing up oil for export, and the remaining shortfall in crude production was largely offset by a reduction in Alberta oil inventories.

Exports of crude oil and bitumen were up 10.5 per cent at $3.8 billion, as prices were up 9.9 per cent and volumes rose 0.6 per cent.

CIBC economist Nick Exarhos said the weak export volumes are another factor that will depress an already bleak May GDP outlook.

"The Bank of Canada may be factoring in some pain in their second quarter outlook, but without a turn ahead in exports, it will soon become time to start taking down growth forecasts for the back half of this year," Exarhos said.

Bank of Canada governor Stephen Poloz has predicted the Alberta wildfires will shave between one and 1.25 percentage points from the annualized pace of growth in the second quarter and that could mean a slight contraction. However, he has said the dip likely means the third quarter will show growth better than anticipated.

Eight of the 11 sectors tracked showed a drop in exports for May. On the opposite side of the ledger, six of 11 sectors saw gains in imports.

Exports to the United States were up 3.6 per cent to $32.1 billion, while imports from our largest trading partner fell 1.1 per cent to $29.3 billion for a trade surplus of $2.8 billion in May.

Exports to other countries fell 13.6 per cent to $9.1 billion in May, while imports from those countries slipped 0.1 per cent to $15.1 billion. Canada's trade deficit with countries other than the U.S. widened from $4.6 billion to a record $6.0 billion in May.