Canada's economy shrank for a second straight quarter, according to the latest data from Statistics Canada, putting the country in a technical definition of a recession, despite positive growth in June.

The country's real gross domestic product declined by an annualized rate of 0.5 per cent in the April-June period of 2015, after falling by 0.8 per cent in the quarter from January-March, meaning Canada's GDP has been in decline for two straight quarters.

But despite the overall second-quarter GDP decline, StatsCan reports 0.5 per cent growth in June, after five straight months of negative growth. Exports, household consumption, and international trade helped prop up the GDP in June, even as business investment declined by 8.0 per cent.

"That's definitely ending a bad quarter on a positive note," Tim Quinlan, a U.S. economist with Wells Fargo Securities, told BNN on Tuesday.

Quinlan said he's not concerned about Canada's long-term growth, despite the country's GDP meeting the unofficial definition of a recession: two consecutive quarters of decline. Quinlan called that definition a "guideline," not a rule.

"Canada is not without its problems, but I wouldn't characterize it as an economy that's in recession right now," he said, adding that he expects growth to pick up in the third quarter.

Samantha Azzarello, vice-president and global marketing strategist for JPMorgan Asset Management, also shared Quinlan's optimism going forward.

"We're forecasting an uptick in Canadian growth in the second half of the year," Azzarello told BNN, explaining that her company is "bullish" on Canadian exports, which she expects to see surge due to the weak Canadian dollar.

Leslie Preston of TD Economics called the 0.5 per cent growth in June a "very healthy gain" that will carry forward into the second half of the year.

"That sets the third quarter up for what we expect to be a solid gain, north of 2 per cent," Preston told CTV News Channel.

Don Drummond, an economist and adjunct professor at Queen's University, says the definition of a recession sprang from a U.S. study done "decades ago," which found that recessions "tend to share that as a common feature."

It is not, however, an official definition.

"It's one of those things, somebody said it once and it's stuck ever since, but it really doesn't have any official standing as a definition," Drummond told CTV's Canada AM on Tuesday.

Drummond said the real issue at hand is that Canada's economy is weak right now.

"It really doesn't matter if it's slightly below zero (per cent growth) or slightly above zero – it's weak," Drummond said.

The GDP report comes at a bad time for Stephen Harper, who has been attacked from all sides for his economic record in the middle of a federal election campaign.

The Conservative leader has avoided using the "R" word, despite his opponents hammering at him with it. During the Aug. 6 leaders debate, for instance, NDP Leader Thomas Mulcair slammed Harper for his government’s economic record.

"Stephen Harper is the only prime minister in Canadian history who, when asked about the recession during his mandate, gets to say, 'Which one?'" Mulcair said.

Liberal Leader Justin Trudeau quickly responded to the recession news on Tuesday morning, tweeting an attack on Harper and calling for "real change."

Later in the day, he said the StatsCan numbers show that "Stephen Harper's economic plan has failed."

During a campaign stop in Burlington, Ont., on Tuesday, Harper was quick to focus on June's strong growth numbers.

"This confirms the renewed growth that most had been predicting," Harper said. "It is good news."

The day before, Harper was asked twice by reporters how he would personally define a recession. Harper, who has a master's degree in economics, answered that he hadn't "gotten into that debate." Instead, he said Canada has experienced a "contraction that has been focused almost entirely in one particular section of the economy, particularly in the energy sector."

He said 80 per cent of the overall economy has grown, but oil prices have meant bad news for Canada's energy sector.

"I think it's more important to describe the reality of the situation, rather than labels," he added, speaking in French.

Economists predict the recession will be short-lived, with Canada's economy anticipated to grow at an annual pace of 1.5 per cent in the third quarter.

Drummond, a former chief economist at TD Bank, said it's important to keep in mind that the StatsCan numbers are a shred of "history," since Tuesday's report is on growth in June, not right now.

He added that while the economy is weak, employment and housing prices have "held up reasonably well."

With files from The Canadian Press