SHERBROOKE, Quebec — A Quebec judge reserved his decision Wednesday on whether to grant a motion that would clear the way for a settlement between victims of the 2013 Lac-Megantic oil train disaster and dozens of companies and individuals linked to the crash that killed 47 people.

Patrice Benoit, the lawyer representing the defunct railway at the center of the disaster, appeared in court to ask that parties who have agreed to pay into a C$431 million compensation fund be protected from further lawsuits.

Canadian Pacific Railway Ltd., which unlike other companies targeted by a class action lawsuit has not agreed to the settlement, asked the court to shield it from future litigation as well and challenged the provincial court’s jurisdiction.

CP transported the tank cars of oil involved in the accident to Montreal before handing them over to Montreal, Maine and Atlantic, which was operating the train at the time of the crash. That railway is now insolvent.

Left unattended, the train rolled into Lac-Megantic at high speed, derailed and exploded, flattening the center of the town. CP did not own the rail cars or the track. Because of their special status as common carriers, railways generally are not allowed to refuse to ship hazardous goods.

“We are being asked to align ourselves with parties responsible for this tragedy and to accept blame even though CP was not involved in the derailment,” spokesman Martin Cej said in an email.

CP’s opposition could block or delay the settlement. If the settlement is approved and CP is not shielded from future lawsuits, it could be the only defendant at trial.

Joel Rochon, the lawyer behind the class action on behalf of Lac-Megantic residents, threatened to target the railway’s directors and officers — including billionaire investor William Ackman — as well as the company itself, if the settlement is not approved.

“If it fails, we will sue CP and the officers and directors for C$431 million,” he said outside the courtroom in Sherbrooke, south of Montreal.

Court documents showed General Electric, Shell Oil Company, ConocoPhillips, Marathon Oil and Canada’s federal government are among the parties that have agreed to the settlement.