Canadian Pacific Railway will appeal a government order to pay for the clean-up of a deadly train derailment in Canada's Quebec province in July, a spokesman said Thursday.

"As a matter of fact, and law, CP is not responsible for this clean-up. CP will be appealing," spokesman Ed Greenberg told AFP.

A day earlier, the government of Quebec added the railway to a list of companies it says are responsible for the cleanup in Lac-Megantic where a runaway train crashed and dumped millions of litres of crude oil on July 6, forcing the evacuation of 6,000 townsfolk and killing 47 people in an inferno that burned for two days.

The order, which is backed by a provincial law that holds companies responsible for environmental damage, said CP had subcontracted the smaller railway involved in the crash to carry crude oil from the Bakken shale fields of North Dakota in 72 tanker cars to an Irving Oil refinery in New Brunswick.

Miami-based petroleum-logistics firm World Fuels Services, which owned the oil, was also named in the order.

Quebec authorities had previously asked Montreal, Maine & Atlantic Railway (MMA), the owner and operator of the train, to pay for the cleanup of the area at the centre of the town devastated by the blast.

But MMA filed for bankruptcy protection after the crash, saying that its insurance coverage was only $25 million while the estimated cleanup costs would exceed $200 million.

MMA's chairman has said the disaster appeared to have been caused by an engineer's failure to properly set hand brakes on the train during a stop. Officials are still investigating.