The railroad industry on Friday sued to block new environmental rules in California, arguing they would force the premature retirement of about 25,000 diesel-powered locomotives across the country long before their zero-emission counterparts are ready to take their place.

California’s aggressive strategy to fight climate change by weaning the state off fossil fuels has produced some of the world’s toughest environmental regulations in the past few years. Since 2020, the state has OK’d rules that would ban the sale of new gas-powered cars, lawn equipment and trucks by the middle of the next decade.

Those rules are designed to slowly phase out gas- and diesel-powered products by banning the sale of most new combustible engines. But the rules governing railroads would ban the use of locomotives more than 23 years old starting in 2030 and would force railroads to start setting aside more than $1 billion a year starting this fall solely to purchase zero-emission locomotives and related equipment. Due to the crucial role California ports hold and the way railroads pass off trains to each other, the state’s mandate would have huge effects nationwide.

In a lawsuit filed in federal court, the industry says the technology for zero-emission locomotives hasn’t been sufficiently tested and won’t be ready to carry the load of delivering more than 30 million carloads of freight nationwide each year.

The lawsuit asks a judge to declare the California Air Resources Board does not have the authority to issue these rules. The trade groups say that only the federal government can regulate railroads because it is an interconnected industry that crosses state lines. They note that more than 500 companies all share the 180,000 miles of track across 49 states, Canada and Mexico.

“While the urgency to act is real and unquestionable, CARB (the California Air Resources Board) uses unreasonable, flawed assumptions to support a rule that will not result in emissions reductions,” said Ian Jefferies, president and CEO of the Association of American Railroads, an industry trade association that filed the lawsuit along with the American Short Line and Regional Railroad Association. “Railroads are working toward reliable, efficient zero-emissions technologies; however, they cannot simply be willed into immediate existence by policymakers.”

The railroad groups say in their lawsuit that the rules show regulators’ “lack of experience with and understanding of the railroad industry.”

Another argument from opponents of the California rule is that transporting goods through railways contributes fewer planet-warming emissions than if those goods were trucked. The transportation sector contributed the largest share of greenhouse gas emissions in 2021, but rail only made up 2% of those emissions, according to the U.S. Environmental Protection Agency.

CARB spokesperson Lys Mendez said Friday the board had not yet seen the lawsuit and would not comment on it.

Regulators say they must move quickly given the scope of the emissions problems from locomotives. The California Air Resources Board says the rules will dramatically reduce pollution from nitrogen oxides, which contribute to the formation of smog, and a type of tiny pollutants that can penetrate deep into a person’s lungs and has been linked to cancer. The board estimates it will save $32 billion in health care costs and prevent 3,200 premature deaths.

Adrian Martinez, a lawyer with environmental nonprofit Earthjustice, called the fate of the California rule “a matter of life and death.”

“There’s generally been a reckless disregard from the rail industry for saving lives from air pollution, and this is just another feather in their cap in their pursuit of continuing to burn really dirty diesel fuel,” Martinez said of the lawsuit.

Alicia Aguayo, a spokesperson for the advocacy group People’s Collective for Environmental Justice, is also not surprised by the lawsuit. For more than two decades, Aguayo lived near a BNSF railyard in San Bernardino, California. Aguayo, whose brother has asthma, is concerned about the health risks diesel pollution from locomotives poses to residents.

“For those of us that lived next to the railyards, it’s significant because it’s a step towards reducing something that is very harmful for our communities,” she said of the rule.

The EPA said last fall that it will consider toughening its rules for locomotive pollution that were last updated in 2008, but California regulators acted first. The California rule would need approval from the EPA to move forward.

California has some of the worst air quality in the country, mostly because of its bustling transportation sector. The state is home to two of the busiest ports in the world at Los Angeles and Long Beach. Most of that cargo is shipped to warehouses further inland before getting on trains to be transported throughout the country.

The top four most polluted cities for ozone and year-round particle pollution in the U.S. are all in California, according to the American Lung Association’s 2023 State of the Air report.

The new California rules would have the biggest effect on Union Pacific and BNSF and short-line railroads that operate in that state. But the changes would affect every railroad because they all regularly pass locomotives back and forth to keep trains moving efficiently across the country. A single locomotive might cross the entire country every couple of months. Any changes would have to be standardized across the industry.

The major freight railroads are already working with major manufacturers to test out battery-powered locomotives with the first ones starting to roll out to Union Pacific railyards in Nebraska and California this year. They’re also experimenting with alternative fuels like hydrogen as possible replacements for their diesel-powered workhorses.

One of the leading locomotive makers, Wabtec, told California regulators that it is at least a couple years away from having battery-powered locomotive prototypes ready for widespread tests hauling freight over long distances, although it did try one out with BNSF for a few months in 2021. Wabtec also said some of the other technologies like hydrogen power face challenges related to the availability of that fuel and the need for an entirely new fueling network. And battery manufacturers may already have a hard time keeping up with all the demand from electric cars, even without upgrading thousands of locomotives.

Railroads prefer to keep using locomotives for decades after they buy them. Just last year, both Union Pacific and Norfolk Southern announced plans to modernize hundreds of locomotives in their fleets to extend their useful life and reduce their carbon emissions. Those upgrades don’t do much to reduce the amount of particulate matter and nitrous oxide emissions those locomotives produce, but the industry has made progress with those also. Those emissions are associated with increased cancer risks and other health problems — particularly in neighborhoods around railyards.

Associated Press reporter Sophie Austin contributed to this story.