Want climate news in your inbox? Sign up here for Climate Fwd:, our email newsletter.

California on Friday became the first state to mandate a full shift to electric buses on public transit routes, flexing its muscle as the nation’s leading environmental regulator and bringing battery-powered, heavy-duty vehicles a step closer to the mainstream.

Starting in 2029, mass transit agencies in California will only be allowed to buy buses that are fully electric under a rule adopted by the state’s powerful clean air agency.

The agency, the California Air Resources Board, said it expected that municipal bus fleets would be fully electric by 2040. It estimated that the rule would cut emissions of planet-warming greenhouse gases by 19 million metric tons from 2020 to 2050, the equivalent of taking four million cars off the road.

Environmental groups said the new regulation was an important step in cutting tailpipe emissions, which are a major contributor to global warming and California’s notorious smog.