OTTAWA - Canada's economy unexpectedly contracted at the start of the fourth quarter due to widespread weakness in the manufacturing sector and a decline in oil and gas extraction, data from Statistics Canada showed on Friday.

The gross domestic product was down 0.3 per cent in October, falling below economists' expectations for no growth. September was revised slightly higher to growth of 0.4 per cent from an originally reported 0.3 per cent.

The decline in October came after four consecutive months of growth and was likely to reinforce expectations that the economy slowed at the end of the year following a strong rebound in the third quarter.

“The GDP report is an ugly snowball of reality to the face of the economy to end the year after a nice run earlier in the fall," BMO Capital Markets Chief Economist Doug Porter wrote in a note to clients Friday.

Output in the manufacturing sector fell by 2.0 per cent, the largest decline since December 2013, on a lower volume of exports. Both durable and non-durable manufacturing were down.

Oil and gas extraction was down 2.5 per cent, pulling back after four months of gains. The support sector for the petroleum and mining industry rose 4.4 per cent on stronger drilling activity, but it was still well below what it saw in early 2015 as the oil price shock began to pinch.

Weaker construction also weighed on the economy with the sector down 0.5 percent, its fifth decline in six months. Residential construction fell 1.0 per cent as builders broke ground on fewer homes.

One of the bright spots in the report came courtesy of real estate, rental and leasing workers, whose collective output rose 0.4 per cent.

“In terms of the reliance of the economy on real estate, it certainly has been one of our big underpinning factors for economic output,” said Dawn Desjardins, RBC’s deputy chief economist, in an interview with BNN. “And we will probably see that come off the boil as we go through next year.”