Ending months of uncertainty and delays, federal regulators on Friday unveiled new rules for transporting crude oil by trains, saying the measures would improve rail safety and reduce the risks of a catastrophic event.

But the rules quickly came under criticism from many sides. Lawmakers and safety advocates said the regulations did not go far enough in protecting the public, while industry representatives said some provisions would be costly and yield few safety benefits.

More than two years in the making, the rules followed a spate of derailments, explosions and oil spills around the country that highlighted the hazards of shipping large quantities of potentially explosive material on rails. The regulations introduce a new tank car standard for oil and ethanol with better protections, and mandate the use of electronically controlled brakes.

Facing growing pressure from members of Congress as well as local and state officials, the Department of Transportation has taken repeated steps in the last two years to tackle the safety of oil trains and reassure the public. Last month, for example, it set lower speed limits for oil trains going through urban areas.