The battle over crude oil trains in California intensified this week, reaching into the legal sphere with potential national repercussions.

The state’s two major railroad companies, Union Pacific and the BNSF Railway, went to federal court Tuesday to argue that neither California nor any other state can legally impose safety requirements on them because the federal government already does that.

The lawsuit came days after California Attorney General Kamala Harris joined other officials in challenging one crude-by-rail project, in the Bay Area city of Benicia. In a letter to Benicia officials, Harris said the city has failed to adequately analyze the potential environmental consequences of Valero Refining Company’s plan to ship two 50-car oil trains daily through Northern California to its Benicia refinery.

Those shipments would run through downtown Sacramento and other Valley cities.

The Valero project and similar plans by other oil companies prompted the state Legislature this summer to pass a law ordering railroad companies to submit an oil spill prevention and response plan to the state, and to provide proof to the state that they have enough money to cover oil-spill damages.

Railroads fired back this week, filing a lawsuit in the U.S. District Court in Sacramento. Their argument: Federal law pre-empts the state from imposing safety restrictions on the railroads.

Read more here.