OTTAWA -- The Canadian economy contracted 0.1 per cent in January, hurt by unscheduled maintenance shutdowns in the oilpatch and weakness in the real estate sector following mortgage rule changes, Statistics Canada said Thursday.

The agency said the drop in real gross domestic product for January compared with growth of 0.2 per cent in December.

Economists had expected an increase of 0.1 per cent for the first month of the year, according to Thomson Reuters.

"This year started off with more of a whimper than a bang, at least from a growth perspective," TD Bank senior economist Brian DePratto wrote in a report.

"As usual though, the trend is more important than the noise. Clearly the pace of economic activity has moderated from last year's red-hot first half performance, but this is to be expected in an economy with little slack remaining."

Goods-producing industries fell 0.4 per cent in January, while services-producing industries was essentially unchanged for the month.

Overall, the mining, quarrying, and oil and gas extraction sector posted its biggest drop since May 2016 as it fell 2.7 per cent in January.

Non-conventional oil extraction fell 7.1 per cent due to unscheduled maintenance shutdowns, while conventional oil and gas extraction fell 0.5 per cent on lower crude petroleum and natural gas extraction.

Mining excluding oil and gas extraction fell 0.8 per cent in January.

Meanwhile, real estate and rental and leasing fell 0.5 per cent after six consecutive months of growth.

The output of offices of real estate agents and brokers posted its largest monthly decline since November 2008 as it fell 12.8 per cent in January in the wake of the implementation of new mortgage rules, including stress-testing for uninsured mortgages.

Statistics Canada said lower activity in real estate contributed to a 0.1 per cent drop in the professional, scientific and technical services sector as legal, accounting and related services contracted 1.9 per cent.