This story was originally published by Mother Jones and is reproduced here as part of the Climate Desk collaboration.

Last month, Elon Musk predicted that the electric vehicle industry will “definitely suffer” from low oil prices — a barrel of crude is about $33 today, down from more than $100 a year ago. Why invest in an electric car when gas is so cheap? And sure enough, sales of gas-guzzling SUVs jumped 10 percent in 2015, while electric vehicle sales dipped 4 percent.

Reader support makes our work possible. Donate today to keep our site free. All donations TRIPLED!

But don’t expect that trend to last, even if oil prices stay relatively low. A new market forecast from Bloomberg New Energy Finance paints a rosy picture for the future of electric vehicles, rising from about 1 percent of global annual vehicle sales today to 35 percent by 2040 — about 41 million cars. That’s good news for Musk and other scions of clean energy. Whether it’s good news for the planet remains to be seen (more on that below).

Here are a few of the report’s main predictions. First, the increase in sales is projected to really pick up after 2025. Green represents electric vehicles (BEV is fully electric battery vehicles like the Nissan Leaf; PHEV is plug-in hybrids like the Toyota Prius); gray is all other types of light-duty cars.

Grist thanks its sponsors. Become one.

sales

BNEF

The report identifies a few factors driving electric vehicle adoption: increasing use of tax breaks and other supportive government policies; rapidly declining costs of batteries (the most expensive component compared with normal internal combustion engine cars); and the declining lifetime cost of ownership of EVs compared with normal cars. The last one is where the cost of fuel comes in; BNEF uses a low-end oil price estimate from the Energy Information Administration that puts oil between $50 and $75 per barrel. Prices much lower than that would slow down, though not totally halt, the growth of EVs, BNEF found.

As technology improves and more cars are sold, the cost of batteries will come down dramatically, BNEF found, as will the overall cost of electric vehicles (including their lifetime fuel consumption). Ultimately, EVs could become less expensive than internal-combustion vehicles between 2020 and 2030, according to BNEF.

China is likely to be the biggest EV customer:

Grist thanks its sponsors. Become one.

country-sales

BNEF

So is this good news for the climate? That depends on where the power for all these new EVs comes from. BNEF finds that EVs will save about 13 million barrels of oil by 2040, equal to about 14 percent of the total oil market in 2016. But previous research has found that in places that rely mostly on coal-fired power plants for electricity, electric vehicles can have a bigger carbon footprint than regular cars. BNEF predicts EVs will create a surge in demand for electricity:

electricity

BNEF

Fortunately, clean energy is providing a lot more of the global growth in electricity production than fossil fuels. BNEF has previously projected that about 70 percent of the new electricity generation added by 2030 will be in the form of wind, solar, and other clean sources, not including nuclear. In other words, these EVs are more likely to run on clean energy than on fossil fuels.

But that’s not the end of the story. There’s also a heavy environmental and humanitarian impact from producing the minerals needed to build all those batteries. Demand for cobalt, lithium, and other key minerals is projected to surge:

mineral-demand

BNEF

A recent report from Amnesty International found that cobalt mining is often linked to child labor, particularly in the Democratic Republic of the Congo, one of the world’s leading producers of cobalt. Lithium mining has been linked to water pollution and depletion, particularly in South America.

Musk can rest assured that he’ll have a market for Tesla’s electric cars for years to come. But in order for that to be a win for the planet, the rest of the clean-energy industry — and international standards for mining — will need to pick up the pace as well.