OTTAWA -- The pace of economic growth in Canada slowed in the first quarter of this year to its lowest rate in nearly two years as housing investment pulled back amid new mortgage stress test rules and a cooling housing market.

Statistics Canada said Thursday the economy grew at an annualized pace of 1.3 per cent for the first three months of the year. That compared with an annual pace of 1.7 per cent in the final three months of 2017.

Economists had expected growth to come in at an annualized rate of 1.8 per cent for the first quarter of 2018, according to Thomson Reuters Eikon.

The rate of growth for real gross domestic product in the first quarter was the slowest pace since the economy contracted in the second quarter of 2016 due to forest fires that destroyed parts of Fort McMurray, Alta., and forced the shutdown of several oilsands operations in the region.

In the most recent quarter, investment in housing fell 1.9 per cent, the largest decline since the first quarter of 2009, due to a drop in ownership transfer costs as the pace of home sales slowed at the start of the year.

Meanwhile, household spending increased 0.3 per cent, the slowest pace since the first quarter of 2015, while household spending on services increased 0.5 per cent and spending on goods was unchanged.

Growth in export volumes slowed to 0.4 per cent compared with one per cent in the fourth quarter of 2017. The gains were mainly contributed by crude oil and bitumen and the export of services. Imports rose 1.2 per cent in the quarter.

Business investment in machinery and equipment rose 4.2 per cent, while intellectual property products rose 3.3 per cent.

Looking back at 2017, Statistics Canada revised its real GDP numbers upward for the second and third quarters.

For the second quarter of 2017, the estimate for the annualized growth rate was increased to 4.6 per cent compared with a March estimate of 4.4 per cent, while the estimate for the third quarter was increased to 1.7 per cent from 1.5 per cent.

The latest reading on the economy follows the Bank of Canada's decision to keep its key interest rate on hold.