OTTAWA -- Looking to shake off its slump, the Canadian economy grew for a second consecutive month in July, helped by a continuing rebound in the oilsands following slowdowns related to maintenance and forest fires.

Statistics Canada said Wednesday that real gross domestic product grew 0.3 per cent in July, topping the 0.2 per cent growth economists had expected, according to a consensus forecast compiled by Thomson Reuters.

However, the federal agency revised downward its result for June to show growth of 0.4 per cent compared with an initial reading of 0.5 per cent.

BMO senior economist Benjamin Reitzes said in a report that GDP growth for the third quarter is tracking on a range of 2.5 to 3.0 per cent.

"The back-to-back gains in GDP (in June and July) suggest that the economy rebounded firmly from the very weak first half of 2015," Reitzes said.

Canada briefly fell into recession in the first half after five consecutive months of contraction produced two quarters of negative growth.

Growth in June reversed the trend and many economists expect the economy to perform better in the second half of the year. However TD Bank economist Diana Petramala cautioned that while the third quarter was looking stronger than expected, questions remain about whether the pace will be sustained in the last three months of the year.

Petramala noted the Pan Am Games in Toronto and the FIFA Women's World Cup likely boosted the economy in June and July.

"The rebound in oil-related sectors has been actually quite strong as well, but oil prices took another leg down in July so some of that optimism might be temporary heading into August and September," she said.

The economic report came in the midst of a federal election that has featured the economy has a key issue for all the parties.

Conservative Finance Minister Joe Oliver touted his government's plan.

"Canada is going to have solid strong growth in the second half of the year and experience positive growth for the full year," Oliver said.

"We've been talking about how our low tax plan for jobs and growth is working, that we must stay the course, particularly in the context of global instability."

But Unifor economist Jim Stanford said the rebound in the energy sector would not be repeated.

"Claiming victory because GDP is growing again after a recession is a bit like commenting on how good it feels to stop beating your head against the wall," Stanford said.

"And while the June and July GDP numbers are positive, in my view it is too early to conclusively declare the recession over."

Driving the growth in July was a 9.1 per cent improvement in non-conventional oil extraction, which includes the Alberta oilsands, following a 7.0 per cent gain in June. The move follows maintenance shutdowns and production difficulties earlier this year. Conventional oil and gas extraction was up 0.8 per cent in July compared with June.

Meanwhile, manufacturing output rose 0.6 per cent in July, while the finance and insurance sector rose 0.8 per cent for the month.

Wholesale trade fell 0.4 per cent for July due to drops in farm products, petroleum products and miscellaneous products, while retail trade rose 0.2 per cent, helped by the auto sector and clothing and clothing accessories stores.

The arts and entertainment sector fell 1.9 per cent, following a 6.8 per cent increase in June due to the FIFA Women's Soccer World Cup hosted by Canada.

Construction slipped 0.1 per cent lower in July.