Canada posted an unexpected trade deficit in October, reflecting economic problems in the United States and Europe and paving the way for lower growth in the fourth quarter, Statistics Canada data indicated on Friday.

The deficit of C$885 million ($868 million) followed a revised C$1.03 billion surplus in September. Market operators had forecast a surplus of C$600 million in October.

Canada's export sector has been struggling for some time with the effects of a strong Canadian dollar and global economic uncertainty.

Canadian net exports are off to a bad start in the fourth quarter. The details of the report were far from encouraging but underscore the turbulence that the Canadian net exports will face in the months ahead, said TD Securities analyst Mazen Issa.

The September surplus, the first since January 2011, had helped boost third-quarter growth to an annualized rate of 3.5 percent, but few analysts believe the fourth quarter will be anywhere near as impressive.

Trade will drag heavily on GDP growth in the fourth quarter, after adding a massive 5 percentage points in the third quarter, said Doug Porter, deputy chief economist at BMO Capital Markets Economics.

The Canadian dollar initially eased slightly against the greenback, dropping to C$1.0242 versus the U.S. dollar, or 97.64 U.S. cents, before rebounding to match Thursday's finish at C$1.0226, or 97.79 U.S. cents.

September's trade figures were helped by the gradual recovery from a series of temporary setbacks, such as the Japanese earthquake and tsunami, as well as wildfires in Canada's energy patch.

That recovery also boosted labor productivity, which grew by 0.4 percent in the third quarter, Statscan said on Friday.

Analysts had expected a 0.2 percent quarter-on-quarter decline after productivity dropped by a revised 1.0 percent in the second quarter.

BMO's Porter said the trade figures were not necessarily as gloomy as they first appeared, noting that exports were up 12.6 percent year-on-year while imports rose by 10.7 percent over the same period.

After three consecutive monthly increases, exports fell by 3.0 percent to C$38.37 billion in October on lower shipments of industrial goods and materials - in particular metals and alloys - as well as energy products.

Imports grew by 1.9 percent to a record high C$39.26 billion on higher shipments of machinery and equipment.

Imports from the United States - by far Canada's largest trading partner - increased by 3.0 percent while exports fell by 0.9 percent. The bilateral trade surplus fell to C$3.10 billion in October from C$4.08 billion in September.

Today's data suggest that the export boom seen in the third quarter did not carry into the fourth quarter, said Emanuella Enenajor of CIBC World Markets.

She said one encouraging sign was the pick-up in machinery and equipment imports, suggesting Canadian capital expenditures rose at the start of the fourth quarter.