A decade from now, city transit agencies in California will no longer be able to buy a bus that runs on diesel or natural gas. The California Air Resources Board, the state’s clean air agency, just voted on a new rule that will require cities to shift to 100% electric buses over time.

It’s happening at a time when many California cities are already starting to buy new electric buses; more than 100 zero-emissions buses are already on roads in the state, and hundreds more are on order. But the new rule will make things move faster.

“The rule is necessary because it sends a clear market signal that the fifth largest economy in the world is serious about zero-emissions transit buses,” says Adrian Martinez, a staff attorney at the nonprofit Earthjustice. “Even though you’ve had a lot of transit agencies step up to the plate to commit to 100%, getting the stamp of approval from a state as big and as powerful as California is important to send a signal nationally.”

The rule applies to all transit buses; school buses and privately operated buses aren’t covered. Starting in 2023, large transit agencies will need to buy electric buses 25% of the time (small agencies have a few extra years for this goal), then 50% by 2026. By 2029, agencies will no longer be allowed to buy a bus that isn’t electric.

It’s a change that took several years of work to make happen. “The natural gas industry tried to derail this legislation,” says Martinez. “They have a lot to lose, because public transit buses are a pretty core part of their business. This rule threatens them.” Some transit agencies also pushed back. But regulators were persuaded by the ability of electric buses to help with California’s air pollution problem–Los Angeles, Bakersfield, and other cities in the state make up eight of the top 10 most polluted cities in the country–and help lower greenhouse gas emissions.

The change in California could also help transform other parts of transportation. “Transit agencies have consistently been pioneers in developing cleaner vehicles,” Martinez says. “A lot of times that work translates into the trucking industry, which is a critical industry to clean up.”

Some key players in the electric bus industry are based in California, such as Proterra, which recently secured a $155 round of investment led by Daimler. The company, led by a former Tesla executive, says that its buses are cheaper than diesel or natural gas over the lifetime of a bus. Some battery electric buses can travel hundreds of miles on a single charge of the battery. But the technology still needs to evolve even more–San Francisco’s transit agency, for example, says that it still needs more proof of the ability of electric buses to handle steep hills and heavy ridership (though electric buses using fuel cells already do operate on the East Bay’s similarly steep hills). In L.A., some electric buses have broken down. “Like with any technology, there’s work that needs to happen,” says Martinez. When L.A. originally shifted to natural gas buses, he says, the transit agency there had to take dozens off the road because of fires and diesel bus breakdowns don’t make the news. In general, electric bus tech is ready.