Image copyright Getty Images Image caption The cost of offshore wind energy installations has tumbled over the past three years

The world added record levels of renewable energy capacity in 2016, according to the UN.

But the bill was almost a quarter lower than the previous year, thanks to the plunging cost of renewables.

Investment in renewables capacity was roughly double that in fossil fuels, says the report from UN Environment.

It follows news that the cost of offshore wind power has fallen by around a third since 2012 – far faster than expected.

But the report’s authors sound the alarm that just as costs are plunging, some major nations are scaling back their green energy investments.

This, they say, reduces the likelihood of meeting the Paris climate agreement.

The paper is published in conjunction with Frankfurt School-UNEP Collaborating Centre and Bloomberg New Energy Finance.

Ulf Moslener, a co-author, told BBC News: “Things are heading the right way, and the learning and technical costs of renewables have done a large part of their job. But investments are not yet there to meet the structural change agreed in Paris."

Europe leads

The report finds that wind, solar and other renewables added 138.5 gigawatts to global power capacity in 2016 - up 8% from 2015. The added capacity roughly equals that of the world's 16 largest existing power producing facilities combined, it says.

Recent figures from the International Energy Agency cited the switch to renewables as one main reason for greenhouse gas emissions staying flat in 2016 even though the global economy grew by 3.1 per cent.

Image copyright Getty Images Image caption Some countries including China have cut back on their spending on renewables

Europe led the way on renewables investment with a 3% increase. The UK spent $24bn and Germany $13.2bn. India kick-started a huge investment in solar with what’s said to be the world’s biggest solar farm.

But globally new investment in solar and wind fell from 2015. Much of the finance drop was due to reduced costs, but countries are also needing less electricity than projected as economies switch towards services, use more LEDs and governments impose standards making appliances like fridges and air-conditioners more efficient.

Some nations are also taking the opportunity to scale back ambition on energy investment.

But Michael Liebreich from BNEF said the key argument over costs had been won: "The question always used to be 'will renewables ever be grid competitive?'.

"Well, after the dramatic cost reductions of the past few years, unsubsidised wind and solar can provide the lowest cost new electrical power in an increasing number of countries, even in the developing world - sometimes by a factor of two."

And Ulf Moslener added a message directed at President Trump: “These technologies are there because they are competitive. We see wind - and in some cases solar – are the cheapest alternatives. Subsidies play less of a role. That’s where the markets are going, and it’s probably a bad idea to work against markets.”

There was a more muted reaction from Dr John Constable of the anti-green group GWPF, whose campaign against wind subsidies has arguably put downward pressure on renewables costs.

He told BBC News: "Faced with a barrage of criticism about subsidy levels, the offshore wind industry has reacted with claims of major cost reductions." But he said the cost of wind power could be deceptive, as it didn't include the cost of supplying the cables to tie turbines into the national grid.

Follow Roger on Twitter @rharrabin