Almost half of the world’s electricity will be powered by wind and solar energies by 2050, according to a long-term economic analysis by BloombergNEF.

Since the 1970s, fossil fuels have commanded a consistent majority of global power but cheaper and more efficient technologies are set to change that, shifting worldwide electricity production from two-thirds fossil fuels to two-thirds renewables by the middle of the century. When factoring in other alternative energies like hydro and nuclear power, the researchers found as much as 71 percent of the market could be dominated by renewable energies.

The report expects $11.5 trillion will be invested in new power generation between now and 2050, with $8.4 trillion going to wind and solar and $1.5 trillion allocated to other zero-carbon technologies like hydro and nuclear.

Hydroelectric opportunities like the Hoover Dam, which serves 1.3 million people, further eliminate a future need for electricity made by burning fossil fuels. Edmund Lowe Photography/Shutterstock

In particular, cheaper batteries and the materials needed to make them have helped spread the application of renewable energy around the world. Technological innovation has dropped the cost of solar materials from $79 per watt in 1975 to $0.37 per watt in 2017, while turbine prices have decreased 32 percent since 2010. Furthermore, machines are pulling more energy than ever before; global average capacities rose from 16 percent in 2000 to around 31 percent in 2016.

“The arrival of cheap battery storage will mean that it becomes increasingly possible to finesse the delivery of electricity from wind and solar, so that these technologies can help meet demand even when the wind isn’t blowing and the sun isn’t shining,” said Seb Henbest of BloombergNEF. “The result will be renewables eating up more and more of the existing market for coal, gas and nuclear.”

Gas is expected to grow modestly before flatlining in 2050, but it is expected to remain in the marketplace as long as renewable energy sources turn to it as a backup in times of extreme shortage and when outputs are at a minimum.

Despite certain efforts to revive America’s coal industry, experts say the extractive resource is the “biggest loser” of the bunch with an expected peak in 2027 before falling sharply, shrinking from 38 percent of global electricity generation to just 11 percent by 2050. Large countries like China and India still rely heavily on coal for a majority of their electricity, but have made serious strides towards cleaner energy sources.