Solar power last year attracted far more investment than any other technology, reaching almost $161 billion, a 18% increase when compared to 2016, a new study backed by the United Nations shows.

According to the report, released Tuesday by the UN Environment’s Economy Division, the Frankfurt School-UNEP Collaborating Centre, and Bloomberg New Energy Finance, solar made up 57% of last year’s total for all renewables (excluding large hydro) of $279.8 billion. It also towered above new investment in coal and gas generation capacity, estimated at $103 billion.

A driving power behind the surge in solar was China, where an unprecedented boom saw some 53 gigawatts added — more than half the global total — and $86.5 billion invested, up 58%, the Global Trends in Renewable Energy Investment 2018 reports shows.

The proportion of world electricity generated by wind, solar, biomass and waste-to-energy, geothermal, marine and small hydro in 2017 was 12.1% (up from 5.2% in 2007).

Since 2004, the world has invested $2.9 trillion in these green energy sources.

Falling costs for solar electricity, and to some extent wind power, is continuing to drive deployment, the study claims. Last year was the eighth in a row in which global investment in renewables exceeded $200 billion — and since 2004, the world has invested $2.9 trillion in these green energy sources.

“The extraordinary surge in solar investment, around the world, shows how much can be achieved when we commit to growth without harming the environment,” said Erik Solheim, head of UN Environment.

“By investing in renewables, countries can power new communities, improving the lives and livelihoods of the people who live in them, and at the same time cleaning up the air they breathe,” he noted.

Overall, China was by far the country that invested the most in renewables last year, reaching a record $126.6 billion, up 31% when compared to 2016.

There were also sharp increases in investment in Australia (up 147% to $8.5 billion), Mexico (up 810% to $6 billion), and in Sweden (up 127% to $3.7 billion).

According to the document, a record 157 gigawatts of renewable power were commissioned last year, up from 143 gigawatts in 2016 and far out-stripping the net 70 gigawatts of fossil-fuel generating capacity added (after adjusting for the closure of some existing plants) over the same period.

“The world added more solar capacity than coal, gas, and nuclear plants combined”, said 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.”

In 2017, the world added more solar capacity than coal, gas, and nuclear plants combined.

Some big markets, however, saw declines in investment in renewables. In the United States, investment dropped 6%, coming in at $40.5 billion. In Europe there was a fall of 36%, to $40.9 billion, with big drops in the United Kingdom (down 65% to $7.6 billion) and Germany (down 35% to $10.4 billion). Investment in Japan slipped 28 % to $13.4 billion.

Angus McCrone, Chief Editor of Bloomberg New Energy Finance and lead author of the report, said: “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.

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

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.

The proportion of world electricity generated by wind, solar, biomass and waste-to-energy, geothermal, marine and small hydro in 2017 was 12.1% (up from 5.2% in 2007).