Canada’s new rail safety legislation would make it possible for governments to recover costs from railways for any fire they cause, not just accidents that involve crude oil, said Transport Canada, a change that could force railways to pay millions in costs associated with forest fires.

Canadian National Railway Co, which is in a legal dispute with the Ontario government over a fire that burned about 40,000 hectares (98,842 acres) in 2012, criticised the legislation on Wednesday.

But new cost-recovery measures announced last week, touted as a move to make the crude by rail business more accountable, would apply to any fire caused by a railway, Transport Canada said late Tuesday in response to questions from Reuters.

Canadian railways have been under pressure to improve safety since the 2013 explosion of a runaway train that leveled the Quebec village of Lac-Megantic, killing 47 people.

Under the new rules, provinces or municipal governments could ask the Canadian Transportation Agency, a federal agency given the power to resolve some disputes in the transport sector, to order a railway to reimburse costs they incurred putting out a fire.

“The proposed amendments would give the CTA authority to determine if a fire was caused by a company’s operations and determine the costs incurred by the province or municipality in responding to the incident,” said Transport Canada spokesman Ben Stanford in an emailed statement.

Train brakes and other rail equipment sometimes throw off sparks, which in rare cases can ignite fires. Canadian railways cross hundreds of miles of remote forest, where large fires can threaten communities and destroy timber. In 2012 more than 90 forest fires were caused by railways, according to government estimates.

CN Rail spokesman Mark Hallman said the railway is concerned the CTA does not have the skills or processes to deal with complex fire-related issues.

“Effective court remedies are already available to governments to receive financial compensation for costs associated with extinguishing railway-related fires,” he said in an emailed statement.

The new rules are contained in legislation introduced by Canada’s Minister of Transport Lisa Raitt, which will amend the Canada Transportation Act and the Railway Safety Act. The bill is assured passage given that the Conservative government controls the majority of parliament.

Transport Canada is a department of the federal government, and the industry’s main regulator. The CTA is an independent federal agency that licenses railways and resolves some disputes, among other tasks.