(CNN) -- Last month's deadly rail accident in Canada spurred the top U.S. rail agency to toughen safety standards, specifically for the transport of hazardous materials.
The U.S. Department of Transportation's Federal Railroad Administration issued an emergency order preventing trains on "mainline tracks or siding from moving unintentionally."
The agency made the move after an unmanned, runaway 73-car train slammed into the center of the Quebec town of Lac-Megantic in the early morning of July 6. Tank cars full of oil exploded and burned in the heart of the commercial district. The remains of 42 people were recovered, and five people are reported missing.
The train had been parked in the neighboring Quebec town of Nantes, but it suddenly rolled into motion after the engineer went to a hotel. The incident is under investigation by Canadian authorities.
Last month, Canada's Transportation Safety Board determined "the braking force applied was insufficient to hold" the runaway train.
"Safety is our top priority," said U.S. Transportation Secretary Anthony Foxx. "While we wait for the full investigation to conclude, the department is taking steps today to help prevent a similar incident from occurring in the United States."
The directive is "mandatory" and the failure of railroads to comply "will result in enforcement actions."
"No train or vehicles transporting specified hazardous materials can be left unattended on a mainline track or side track outside a yard or terminal, unless specifically authorized," the order said.
If a railroad wants authorization to leave a train unattended, it "must develop and submit to FRA a process for securing unattended trains transporting hazardous materials, including locking the locomotive or otherwise disabling it, and reporting among employees to ensure the correct number of hand brakes are applied."
Employees who are responsible for securing trains and vehicles transporting such specified hazardous material must tell dispatchers specific information: "the number of hand brakes applied, the tonnage and length of the train or vehicle, the grade and terrain features of the track, any relevant weather conditions, and the type of equipment being secured."
Train dispatchers must record the information they get and "railroads must implement rules ensuring that any employee involved in securing a train participate in daily job briefings prior to the work being performed."
Also, procedures must be developed "to ensure a qualified railroad employee inspects all equipment that an emergency responder has been on, under or between before the train can be left unattended." And, railroads must pass along the order to "all affected employees."
The rail agency and the Pipelines and Hazardous Materials Safety Administration also issued a safety advisory listing recommendations railroads are expected to follow.
"When PHMSA talks about the transportation of hazardous materials, safety is a prerequisite to movement," said PHMSA Administrator Cynthia Quarterman. "We are taking this action today and we will be looking hard at the current rail operating practices for hazardous materials to ensure the public's safety."