OTTAWA - The Canadian economy shrank for the second straight quarter of 2015, the technical definition of a recession.

Statistics Canada says the economy contracted at an annual pace of 0.5 per cent in the second quarter of the year.

That was a smaller decline than analyst estimates but Statistics Canada says the first quarter shrank more than originally reported, with a revised decline of 0.8 per cent rather than 0.6 per cent.

On the positive side, Canada's gross domestic product grew by 0.5 per cent in June, after shrinking for five straight months. The growth was led by a 3.1 per cent boost in natural resources extraction.

The fresh data is likely to add fuel to the heated political debate over how best to respond to the weakened economy as parties battle for support ahead of the Oct. 19 election.

The Statistics Canada report is also expected to intensify the economic argument over the severity of the technical recession -- defined as two consecutive quarters of declining GDP.