Los Angeles is abandoning a plan to spend billions of dollars rebuilding three natural gas power plants along the coast, Mayor Eric Garcetti said Monday, in a move to get the city closer to its goal of 100% renewable energy and improve air quality in highly polluted communities.

The mayor’s decision marks an abrupt change of course for the Los Angeles Department of Water and Power, where top staffers have argued in recent months that the gas plants are critical to keeping the lights on in the city. Environmental groups have urged DWP to replace the aging facilities with cleaner alternatives, saying the gas-fired plants need to go because they contribute to climate change and local air pollution.