Several countries across the globe have committed to increasing their investment in renewable energy, while decreasing investment in other forms of energy.

According to a new study, solar power generated more capacity in 2017 than fossil fuel power, with China accounting for more than half of the world’s new solar capacity. In total, global solar investment jumped 18 percent to $160.8 billion with cumulative renewable energy investment reaching $2.9 trillion since 2004.

The Global Trends in Renewable Energy Investment 2018 report, released by UN Environment, Frankfurt School - UNEP Collaborating Centre, and Bloomberg New Energy Finance, reports that falling costs for solar electricity, and to some extent wind power, are continuing to drive deployment.

Countries around the world installed 98 gigawatts of new solar capacity, significantly more than renewable, fossil fuel or nuclear energies. Solar power made up 57 percent of last year's total for all renewables—excluding large hydro—of $279.8 billion.

China on its own added 53 gigawatts last year and invested $86.5 billion on the initiative. Overall, China was by far the world's largest investing country in renewables, at a record $126.6 billion, up 31 percent on 2016.

“The extraordinary surge in solar investment shows how the global energy map is changing and, more importantly, what the economic benefits are of such a shift,” UN Environment head Erik Solheim, said in a statement. “Investments in renewables bring more people into the economy, they deliver more jobs, better quality jobs and better paid jobs. Clean energy also means less pollution, which means healthier, happier development.”

Along with China, Australia, Mexico and Sweden amped up their investment in 2017. Mexico increased its investment 810 percent to $6 billion, while Australia went up by 147 percent to $8.5 billion and Sweden increased by 127 percent to $3.7 billion.

Last year, a record 157 gigawatts of renewable power was commissioned, more than the 143 gigawatts of power in 2016, as well as more than the 70 gigawatts of fossil-fuel generating capacity added over the same period.

“The world added more solar capacity than coal, gas, and nuclear plants combined,” Nils Stieglitz, President of Frankfurt School of Finance & Management. “This shows where we are heading, although the fact that renewables altogether are still far from providing the majority of electricity means that we still have a long way to go.”

While the overall investment rose, some of the world’s superpowers actually saw a decline in solar power investment. The United States saw a 6 percent decrease in investment, bringing the total to $40.5 billion. Overall, in Europe there was a 36 percent drop across the board, with a $40.9 billion total investment.

The U.K. had a 65 percent decrease, bringing their investment to $7.6 billion, while Germany saw a 35 percent drop in their $10.4 billion investment. Japan also had a 28 percent slip in investment, bringing their total to $13.4 billion.

“In countries that saw lower investment, it generally reflected a mixture of changes in policy support, the timing of large project financings, such as in offshore wind, and lower capital costs per megawatt,” Angus McCrone, chief editor of Bloomberg New Energy Finance and lead author of the report, said in a statement.

Global investments in renewable energy of $2.7 trillion from 2007 to 2017 have increased the proportion of world electricity generated by wind, solar, biomass and waste-to-energy, geothermal, marine and small hydro from 5.2 percent to 12.1 percent.

The current level of electricity generated by renewables corresponds to about 1.8 gigatonnes of carbon dioxide emissions avoided - roughly equivalent to those produced by the entire U.S. transport system.