Consumer spending helped the Canadian economy narrowly avoid a recession in the second quarter.

Real gross domestic product (GDP) edged up 0.1% in the second quarter of 2008, following a 0.2% decline in the first quarter, Statistics Canada said today.

Annualized, the Canadian economy grew at a rate of 0.3% in the second quarter, compared with 3.3% growth for the U.S. economy, StatsCan said.

While final domestic demand continued to outpace GDP, growing 0.5% in the quarter, foreign demand for Canadian goods and services registered its fourth consecutive quarterly decline.

Real GDP advanced 0.1% in June, StatsCan said.

The volume of exports of goods and services fell 1.5% in the second quarter, the fourth consecutive decline. The drop was widespread, as international sales of forestry products, machinery and equipment, and automotive products continued to fall reflecting, in part, declining U.S. expenditures on these goods.

The volume of imports of goods and services advanced 0.6%, after falling 2.3% in the first quarter.

Personal spending grew 0.6% in the second quarter, continuing to moderate after gains of 1.8% and 0.8% in the previous two quarters. The slowdown reflects the drop in spending on durable goods, StatsCan said.

Business investment in plant and equipment declined 0.4% in the second quarter. Engineering construction increased 0.2% whereas capital spending on non-residential buildings dropped by 1.9%.

Meanwhile, corporations recorded a significant profit increase in the second quarter (+8.3%), spurred by price increases, particularly for crude petroleum, natural gas and coal. This was the strongest gain in profits since the first quarter of 2004.

Separately, the statistical agency reported that the price indexes for manufactured goods and raw materials registered lower monthly growth in July than in the previous four months, increasing 0.4% and 1.4% respectively, primarily as a result of the slowdown in the rise of petroleum prices.