Two CN Rail workers suffered minor injuries after a mudslide knocked a locomotive and several cars off the rails early Tuesday, about 200 kilometres northeast of Vancouver.

CN spokeswoman Kelli Svendsen said the Canadian Pacific freight train was travelling westbound with a CN crew on CN tracks at about 3 a.m. PT.

The train was about 12 kilometres west of Boston Bar in the Fraser Canyon when it jumped the tracks, trapping the two CN workers in the cab of the locomotive.

"They were in the locomotive for a short period of time," said Svendsen, noting the men were rescued quickly and were conscious and responsive on the way to hospital.

"The five cars that derailed were carrying copper concentrate," said Svendsen, but she could not say if any of the cargo had spilled and when the westbound tracks would reopen.

The mudslide was likely the result of the heavy rains that have been hitting the B.C. coast in recent days. Two avalanches and a rock slide also closed highways in the region Tuesday morning.