SACRAMENTO, Calif. (AP) — California moved Friday to eliminate fossil fuels from its fleet of 12,000 transit buses, enacting a first-in-the-nation mandate that will vastly increase the number of electric buses on the road.

The California Air Resources Board voted to require that all new buses be carbon-free by 2029. Environmental advocates project that the last greenhouse-gas-emitting buses will phase out by 2040.

While clean buses cost more than the diesel and natural gas vehicles they’ll replace, advocates of the mandate say they have lower maintenance and fuel costs. Supporters hope creating demand for thousands of clean buses will bring down the price of those buses and eventually other heavy-duty vehicles like trucks.

California has 153 zero-emission buses on the road today with hundreds more on order. Most of them are electric, though technology also exists for buses powered by hydrogen fuel cells.

“Every state could do a strategy like this,” said Adrian Martinez, an attorney for Earthjustice, an environmental legal group that supports the rule. “This is something that California did first because we have major air quality and pollution problems, but this is something other states could pursue.

Existing state and federal subsidies are available to help transit agencies absorb some of the higher costs of carbon-free buses, along with money from the state’s settlement with Volkswagen over the German automaker’s emission-cheating software.

In approving the mandate, air board members cited both a reduction in greenhouse gas emissions and improved air-quality along heavily trafficked transit corridors in smog-polluted cities.

The transportation sector accounts for 40 percent of California’s greenhouse gases, and those emissions are rising even as electrical emissions have fallen substantially.

California needs to drastically transportation emissions to meet its aggressive climate-change goals.