MONTREAL -- Canadian Pacific Railway has been ordered by a federal agency to end an embargo that prevented Montreal Maine and Atlantic Railway from accessing cargo such as crude oil.

Calgary-based CP had expressed concern about the "fitness" of the insolvent short-haul railway to safely handle hazardous substances in light of the deadly derailment and crash last month that devastated Lac-Megantic, Que.

But the Canadian Transportation Agency agreed with MM&A that the short-haul railway would suffer irreparable financial harm from CP's boycott and issued an order late Wednesday that overrides Canadian Pacific's decision.

"The agency also finds that the balance of inconvenience clearly favours MMA as the refusal to grant the interim order would result in the virtual cessation of MMA's operations," the CTA wrote in an eight-page decision.

MM&A had argued that CP's embargo was a breach of its level of service obligations and that the railway can't dictate what traffic MM&A delivers or receives. It said most, if not all of its customers, would be unable to access CN's line if it were prevented from using CP's Saint-Jean-sur-Richelium interchange.

The CTC also said that its mandate was limited to determining the adequacy of insurance and not issues regarding public safety.

Canadian Pacific (TSX:CP) said it was reviewing its legal options.

"While we disagree with this order, we have taken immediate steps to comply," CEO Hunter Harrison said in a news release. "The CTA, as federal regulator, has satisfied itself that MM&A is fit to operate and has adequate insurance to do so."

CPR had told the regulator that MM&A was not suffering irreparable harm and that the railway exists solely to find a potential buyer. Any revenues generated will simply benefit secured creditors, notably the Quebec and U.S. governments, with "negligible" impact on the overall value of its assets.

The rail tankers that derailed in Lac-Megantic -- causing a fire that caused 47 deaths, displaced thousands and destroyed the city's core -- were carrying crude oil that originated in the U.S. Midwest and were carried on part of their journey by CPR.

MM&A is a short-haul railway that was hired to move the tankers on one leg of a journey between the U.S. Midwest and an Irving refinery in New Brunswick.

CP Rail issued an embargo after the agency withdrew MM&A's certificate of fitness, which suspended its ability to operate. The transportation agency agreed to reinstate the certificate three days later, allowing MM&A to continue to operate until Oct. 1, providing it proved it was holding adequate insurance.

Canadian National Railway (TSX:CNR) had initially also cut off Montreal Maine & Atlantic from receiving interchange traffic but voluntarily resumed the practice after the agency updated its decision.

Gilles Robillard of the court-appointed monitor, Richter Advisory Group, urged the Quebec Superior Court judge to approve the request to provide insurance guarantees in order to preserve MM&A's value, maintain employment and avoid economic losses from cutting service to the railway's customers.

"Absent a continuation of its operations, MM&A may determine that the ultimate goal sought by the filing under the CCAA (Companies' Creditors Arrangement Act) is no longer achievable and may decide to file for bankruptcy," he wrote in Richter's first report.

The railway obtained creditor protection in Canada and bankruptcy protection in the United States to give it time to ensure an orderly process to find a buyer.

J.D. Irving, the parent company of NB Southern Railway, said this week that it was reviewing all of its options, including a potential bid to purchase the insolvent railway.

According to court documents, Montreal, Maine & Atlantic Canada owes about $48 million to 128 unsecured creditors, including $43.4 million to its parent company and $2.35 million to NB Southern.

Richter said the railway will be forced to lay off all of its Canadian employees and put the payment of accrued vacation in jeopardy if it could't obtain the court's approval need to obtain the required operating licence.

The railway has 62 employees, including 34 active workers, according to the court filing. The active workers are owed about $97,000 in accrued pay due Sept. 6, plus $440,000 in accrued vacation pay to all employees, according to the filing.

"The cash flow will not permit the payment of these amounts in the event of an immediate cessation of operations."

Meanwhile, the Quebec government announced Thursday that it is seeking a voice in the U.S. bankruptcy court's handing the MM&A case.

Quebec Justice Minister Bertrand St-Arnaud said the provincial government is seeking to ensure there is compensation for those affected by the derailment and ensure that Quebec taxpayers don't bear the costs of decontamination and rebuilding.

"The Quebec government intends to take the best steps to get the maximum from those responsible for this tragedy," St-Arnaud said in a news release.

The government has appointed a Quebec bankruptcy specialist with standing in New York State to make representations on behalf of an informal creditors' committee, which represents the province, the municipality and members of a class-action lawsuit.

Luc Despins of the firm Paul Hastings will ask the court and the U.S. Trustee Office to officially recognize the creditors' committee.

"We want to ensure that (all) victims...are represented and have a seat at the table in the American process to obtain the most funds possible," he said in an interview.

Despins rated the chance of success as being reasonably good. "We wouldn't do it is we didn't think there was a good chance to get it."