Renewable energy will draw $8 trillion in investment over the next 25 years, nearly double the amount that countries will spend on coal, natural gas and nuclear plants. The figures suggest fossil fuels will no longer dominate the global electricity sector in coming decades, though greenhouse gas emissions will continue to threaten the planet, Bloomberg New Energy Finance (BNEF) said Tuesday.

Solar energy in particular will see a $3.7 trillion surge in investment through 2040, including $2.2 trillion for rooftop and small-scale systems, the London research group said in its forecast. The costs of solar plants are expected to plunge by nearly half over the next two-and-a-half decades, eventually becoming the cheapest source of electricity in a growing number of countries.

The falling prices will enable solar to beat out new fossil fuel plants and even begin to replace some existing coal and natural gas-fired power plants, Bloomberg News reported. Developing economies in particular will turn to small-scale solar arrays to light up rural and lower-income communities where electricity is otherwise inaccessible or unaffordable. Cheaper costs aren't the only draw: Lower-carbon electricity is critical for enabling governments to reach their climate change goals.

Across the world, “We will see tremendous progress towards a decarbonized power system,” Michael Liebrich, chairman of BNEF’s advisory board, said in a statement.

Global solar photovoltaic (PV) installations are already slated to reach 55,000 megawatts this year, a 36 percent jump over 2014 installations, a separate GTM Research report found last week. By 2020, global PV installations could climb to 135,000 megawatts for the year thanks to falling panel costs and rising demand from large corporations, including Cisco Systems Inc. The IT firm Tuesday became the latest U.S. technology giant to back a major solar project, with a 20-megawatt facility planned in the California desert to power its headquarters in San Jose, the company announced.

Even so, nonrenewable fuel supplies will still attract $4.1 trillion in total investment through 2040. About 40 percent of the pie will go to coal plants, while nuclear and natural gas projects will receive 32 percent and 29 percent of investments, respectively, BNEF said. Overall, countries are predicted to spend a total of $12.2 trillion in global power generation, with the vast majority of spending going to power-hungry emerging economies.

Despite the gains in renewable energy investments, the forecast shows fossil fuels will continue to comprise a substantial slice of the global power sector, leading to rising carbon, methane and other heat-trapping emissions that are changing the global climate.

Climate change pollution will increase until 2029, and emissions will still be 13 percent above 2014 levels by 2040, BNEF said. The International Energy Agency last week called for capping emissions by 2020 in an attempt to keep global warming below 2 degrees Celsius (3.6 degrees Fahrenheit) over preindustrial temperatures.

“Unless further radical policy action is taken,” Liebrich said, “emissions [continue] to rise for another decade and a half.”