Metrolink unveiled its first-ever clean diesel locomotive on Thursday that officials said will emit far fewer smog-forming gases and is more powerful than its current trains.

The new F125 locomotive, built by Caterpillar, Inc., will begin taking passengers later this month, making the Southern California commuter rail service the first transit agency in the nation running the state-of-the-art train, said Sherita Coffelt, Metrolink spokewoman.

By next year, Metrolink will have placed 40 new locomotives in service, nearly replacing its entire fleet of 55. When all 40 are running, it will mean the equivalent of removing the annual emissions of 31,320 vehicles on roadways, Metrolink estimated.

The locomotive swap out also replaces the six-county commuter rail’s aging fleet. Metrolink’s locomotives are 25 years old, dating back to when the agency first came into existence in 1992.

The F125 has a 4,700-horse power engine, 64 percent more power than current trains, making adding cars to accommodate more riders easier, said Neil Brown, Metrolink’s fleet manager.

California environmental agencies have been working on getting these nearly pollution-free passenger locomotives onto the rails in Southern California for years in an effort to bring the region cleaner air, said Mary Nichols, chairwoman of the California Air Resources Board.

Transportation causes more than half of the foul air in Southern California, causing lung disease and, in particular, childhood asthma, said state Senate President Pro-Tem Kevin de Leon during a kickoff ceremony from Union Station in Los Angeles.

While automobiles have reduced tailpipe emissions through more efficient engines, hybrid cars and electric vehicles, diesel trains have not kept pace.

“Slowly but surely, we are turning the car capital of the world into a much more transit friendly place and cleaning up our air in the process,” said de Leon.

The locomotive replacements will cost about $279 million, Coffelt said. Most of the funding comes from state environmental programs — the South Coast Air Quality Management District contributed $111 million, the state’s Cap and Trade program added $132 million, with the rest from local and regional grants.

The senator compared the state’s commitment to clean energy and environmentally friendly technology with what he said was the undermining of such programs by the Trump administration.

“Today, we have something dramatically different than what is happening in dysfunctional Washington D.C., ” he said.

Nichols said cleaner locomotives are a key to helping Southern California meet safe-level standards for ozone. a caustic, odorless gas that forms in the atmosphere out of emissions from smokestacks and tailpipes.

At the end of smog season on Sept. 30, Southern California recorded 132 days above the eight-hour ozone standard, up from 129 last year, said Sam Atwood, SCAQMD media relations manager. Most of the rise in unhealthful days is due to warmer temperatures that accelerate ozone production, he said.

Driving down emissions from trains is part of the SCAQMD’s long-range plan to reduce ozone and particulates. The technology is expensive, meaning change comes clowly.

“We have been pushing for Tier 4 locomotives for a number of years now. First we were told they couldn’t be made, then we were told they would be too expensive,” she said in an interview. “We are now looking at Tier 5.”

The Caterpillar clean-diesel locomotives use a unique fuel injection system to allow diesel to burn more completely in each cylinder, producing less particulate pollution.

Synthetic urea, a catalyst, is injected into the exhaust stream. This causes a chemical reaction, breaking down toxic oxides of nitrogen into harmless free nitrogen and water vapor.

As a result, people who live along the commuter service tracks will breathe in less pollution, said Assemblywoman Blanca Rubio, D-Baldwin Park. Many San Gabriel Valley residents — from Pomona to East Los Angeles — live along the San Bernardino line, the most popular Metrolink train.

Orange County Supervisor Shawn Nelson, who also sits on the AQMD board, said finding new ways to reduce ozone levels in the south coast basin is getting increasingly more difficult. All the low-hanging fruit has been taken.

“We’ve run out of obvious options to get to clean air. What’s left? It is planes, trains and automobiles,” he said.

Experts hope that the cleaner locomotives will spread to other uses, such as freight trains, and to other parts of the state and country.

“Metrolink and California’s leadership will certainly inspire other operators across the nation to operate the cleanest, most advanced locomotives money can buy,” said Raymond Tellis, director of the Federal Transit Administration.

Metrolink gave rides to politicians and the press from Union Station to its train yard. On Saturday, the commuter rail service will bring the locomotive to the Metrolink station in Moorpark.