Canada's economy shrank in the second quarter of the year, the first quarterly decline since the recession of 2009.

The country's gross domestic product fell 0.1 per cent in the April-June period, or 0.4 per cent on an annualized basis, Statistics Canada said Wednesday.

Economists were expecting growth would be flat in the period.

The decline was due largely to a 2.1 per cent drop in exports, the agency said.

"This morning's report is a reminder that Canada is not an island, and is vulnerable to external economic shocks," TD economist Diana Petramala said.

Although the overall economy shrank slightly, two key sectors recorded much larger declines — oil and gas extraction dropped 3.6 per cent, and output in the manufacturing sector declined by 0.9 per cent.

There were a few bright spots in the numbers. Consumer spending on goods and services increased 0.4 per cent in the quarter, after being unchanged in the first three months of the year.

Business investment in plants and equipment was also 3.7 per cent higher. "That was encouraging," Finance Minister Jim Flaherty told journalists in reaction to the news in Toronto on Wednesday. "We’re encouraging business to open up their balance sheets and spend money, and there’s some evidence of that."

"The good news is that the domestic economy remains strong with consumption and business investment continuing to expand," Flaherty said.

Opposition criticisms

Liberal finance critic Scott Brison noted that Flaherty's budget had expected the U.S. economy to grow 3.1 per cent this year, a mark many now believe will not be achieved.

"If the U.S. goes into a full fledged recession, that will have an even more significant affect on our economy," Brison said.

NDP finance critic Peggy Nash called on Flaherty to help buffer the economy from the slower than expected growth in the U.S. by spending at home.

"He can't control consumer demand or business demand in the U.S. or in Europe, but what he can do is invest strategically in Canadian infrastructure for example to increase demand here in Canada to take up some of that slack," she said.

'Canada is not an island, and is vulnerable to external economic shocks.' —TD economist Diana Petramala

Statistics Canada also revised downward its initial estimate of the economy's growth in the first quarter. The agency now says the economy expanded at an annualized pace of 3.6 per cent in the January to March period, down from the 3.9 per cent growth it first reported.

The U.S. economy expanded at an annual rate of one per cent in the second quarter. That too, was slower than it has been, and a troubling sign from Canada's largest trading partner.

"To the extent that these factors support a rebound in US economic growth, a recovery in Canadian exports will follow," RBC Economics said in a note Wednesday.

The data paints a picture of an economy that was shrinking, ever so slightly, at the end of June. More signs, including a weakening loonie and Toronto Stock Exchange, have come since then, so the possibility for two quarters of decline — the technical definition of a recession — exists.

But most economists are not yet expecting that to happen. "Despite the slight contraction in second-quarter GDP, by 0.4 per cent at annualized rates, we estimate better growth is in store this quarter," Capital Economics said in a note to clients.