Railroads that haul volatile crude shipments have reached an agreement with U.S. transportation officials to adopt wide-ranging, voluntary safety measures after a recent string of explosive and deadly accidents.

The agreement between the U.S. Department of Transportation and the Association of American Railroads calls for railroads to slow down oil trains through major cities, increase track inspections and bolster emergency response planning along routes that carry trains hauling up to 3 million gallons of oil each.

The voluntary measures would begin going into effect in late March and be fully in place by July 1.

After a boom in domestic drilling in recent years, oil trains now travel thousands of miles from oil producing areas, including the Northern Plains, to coastal refineries and shipping terminals along the Mississippi River and other major waterways.

“Safety is our top priority, and we have a shared responsibility to make sure crude oil is transported safely from origin to destination,” U.S. Transportation Secretary Anthony Foxx said in an email. “Today’s changes will enhance safety while we continue to pursue our comprehensive approach focused on prevention, mitigation and emergency response through collaboration with our partners.”

The agreement does not resolve concerns over another fuel, ethanol, that’s also seen a spate of accidents as production has increased.

Railroads and federal officials also said they would address separately a design flaw in tens of thousands of tank cars that make them prone to rupture during derailments.

Texas-based BNSF Railway Co., unwilling to wait for pending regulations to be finalized, announced it intends to buy a fleet of 5,000 strengthened tank cars to haul oil and ethanol. The upgraded tank cars add ½-inch thick steel shields that would go on either end of the cars to help prevent them from cracking open during accidents.

The new cars also would have pressure-relief valves capable of withstanding an ethanol-based fire and a tank body made of thicker steel than existing cars. However, it would not mean those older cars would go away, and there’s already a two-year backlog on new tank car construction.

By taking voluntary steps, railroads will be able to act far more quickly than if they waited for new safety rules to be drafted and approved by the government, said Robert Chipkevich, former director of rail and hazardous materials accident investigations at the National Transportation Safety Board.

But he added that there’s no way for now to enforce the industry’s commitments.

“It’s a positive step,” Chipkevich said. “But certainly there’s nothing to say they would have to continue following those practices. The only way you can enforce something like that would be for regulators to publish regulations and do periodic oversight.”

Federal officials said they would continue to pursue longer-term measures to further improve safety.

The volume of crude oil moving by rail increased to 400,000 cars last year from fewer than 10,000 in 2008. Rail has captured the bulk of crude shipments from North Dakota’s booming Bakken shale region, in large part because pipelines simply don’t go where the oil is needed and take a long time to construct.

At least 10 times since 2008, freight trains hauling oil across North America have derailed and spilled significant quantities of crude, with most of the accidents touching off fires or catastrophic explosions.

The deadliest wreck killed 47 people in the town of Lac-Megantic, Quebec.