Los Angeles doesn’t have a great environmental reputation. It’s the car capital of the United States. It’s famous for its curtains of smog, and for stealing a bunch of water once.

But the city is in the midst of a metamorphosis. With fewer, yet stronger storms on the horizon, it’s begun an ambitious plan to cut its reliance on imported water in half by 2025. And it’s emerging as a leader in the frantic international quest to curb emissions—in 2016 alone, it slashed emissions by 11 percent, the equivalent of taking more than 700,000 cars off the road.

Justin Sullivan/Getty Images

This week, Los Angeles mayor Eric Garcetti joined other leaders, along with activists and business leaders, at the Global Climate Action Summit in San Francisco. The mission? Stop climate change before it destroys the planet, and our species along with it. Garcetti sat down with WIRED for two interviews, which we have combined and condensed, to talk about how to turn LA into a greentech testbed, why cities have to compete in order to save the world, and what the city can learn from its infamous water wars.

Matt Simon: In what way are cities uniquely positioned to be leaders on climate change?

Eric Garcetti: There's never been more people living in cities, and many of them control directly the most important national assets, like ports and airports and utilities. We have a culture of trying new things, whereas in Washington and other national capitals it's like, Oh make sure it's perfect before it comes to us and then we'll scale it up. Cities are those laboratories of democracy that states used to be. In a city like LA, we're trying to get to this idea of a city as a platform.

MS: So what is LA doing about emissions? It's known as a place of cars, of course, is that part of it? Is it renewable energy?

EG: In Los Angeles, we can't afford not to do all of the above, from energy generation to our building codes to transportation including personal transportation, our mass transit, and our goods movement from the port and our logistical network. We're the number one solar city in America—we've made a pledge to go to 100 percent renewable power, we're reducing our water imports, which consumes a lot of energy. We're cleaning up the port of LA, which is now the greenest port in the world, and made a pledge to go to zero emissions by 2035.