On July 6, France made a bold announcement: it wants to end the sales of gas- and diesel-powered vehicles by 2040.

After that date, automakers will only be allowed to sell electric and hybrid vehicles, and vehicles that run on other cleaner power.

This is part of the nation’s fight against global warming. In addition to ending sales of gas and diesel vehicles, the government also announced a range of initiatives including financing new infrastructure for charging electric cars, a “cash for clunkers” program designed to incentivize people to give up their old, polluting cars for cleaner-running vehicles, and support for the development of alternative fuels.

Of the two million cars sold in France last year, only 4 percent are electric, hybrid, or alternative fuel-powered. But that number is growing quickly: sales of those vehicles rose 25 percent in the first quarter of 2017.

France’s announcement cam shortly after Swedish carmaker Volvo said that every car it makes from 2019 forward will be hybrid vehicles or have only an electric motor.

“Our customers are asking more and more about electric cars,” Volvo CEO Hakan Samuelsson told the New York Times. Sure, the strategy has risks, Samuelsson said, but “a much bigger risk would be to stick with internal combustion engines.”

Volvo’s parent company, Geely Automobile Holdings of China, already produces battery-powered cars for the Chinese market. And Volvo’s battery-powered cars will be produce in China initially, too. However, the company plans to produce vehicles in Europe and at a new factory it is building near Charleston, South Carolina.

“Chinese ownership of Swedish-based Volvo likely played a role in the automaker’s announcement,” said Michelle Krebs, an analyst with autotrader.com. “China’s air pollution problems have prompted a more serious push toward cleaner automobiles.”

Some are pointing to Volvo’s move as a sign that the era of the gas guzzler may be coming to an end, despite the fact that U.S. automakers continue to produce SUVs and pickup trucks—which are popular now because of relatively low gas prices.

Almost all the major carmakers are investing in hybrid and battery technology. Concerns about range make many people hesitant to buy battery-only cars, but the technology and charging power of those batteries is constantly improving.

Automakers are being pushed toward electric motors by pressures such as tougher environmental regulations and the desire for self-driving cars (which are easier to link to electric motors than conventional engines). But eliminating the gasoline engine may be difficult.

In the U.S., hybrid cars comprised only 2 percent of 2016 passenger car sales, and that number has declined as the price of gas has fallen. Nobody has figured out how to make a profit selling electric-only vehicles—even iconic electric vehicle maker Tesla has yet to be profitable. Most electric-only cars are very expensive, even with government subsidies.

Nonetheless, most carmakers expect electric and hybrid car sales to grow as technology improves, public charging stations become more common, and prices fall. This can only benefit France as it works to phase out gas- and diesel-powered vehicles.