Canada's economy grew by half a per cent in May, almost twice what economists were expecting, partly because of a strong rebound in the oil and gas sector.

The country's gross domestic product expanded by 2.6 per cent in the 12 months up to May, led by growth in mining, quarrying, and oil and gas extraction, Statistics Canada reported Tuesday.

The Alberta oilsands were a big part of that expansion, as crude bitumen extraction grew by 5.3 per cent in May following maintenance shutdowns at some facilities a month earlier. Economic activity in Canada's oilsands has now expanded by 14 per cent in the past year.

Overall, the oil and gas sector has grown for four months in a row and expanded by 6.4 per cent in the past 12 months.

Real estate, meanwhile, was a soft spot as sales activity for real estate agents and brokers declined by 2.7 per cent. The sector has shrunk in four of the first five months this year, following new mortgage rules put in place in January.

After slow sales during an unseasonably chilly April, Canadian retailers rebounded with two per cent higher sales in May. — the strongest month since October.

Only one out of 19 sectors that the data agency tracks reported a contraction during the month, "and that was utilities, because the weather returned to normal after a horrid April," Bank of Montreal economist Doug Porter said.

"Canadians came out of hibernation in May, and the economy benefited big time."

Porter said BMO is expecting a "much milder" GDP report for June and the second half of 2018, with tariffs kicking in and the Syncrude outage temporarily biting into growth.

"Still, this strong result adds a trace of drama to the upcoming September 5 [Bank of Canada] rate decision, with the Q2 GDP report due the prior week, and memories of last year's September surprise still fresh," he said.

TD senior economist Brian DePratto said in a commentary that it is unlikely that today's data alters the outlook at the Bank of Canada when it comes to its next rate decision.

"They, like us, had already penciled in a robust Q2," he said. "Clearly then, while it may not be right around the corner, so long as the Canadian economy continues to evolve in line with their expectations, more monetary tightening will be forthcoming."