LONDON (Reuters) - Clean energy investment in the United States surged to a fresh record of $55.5 billion last year, despite the government’s attempts to roll back supportive policies, a report showed on Thursday.

FILE PHOTO: File photo: A wind farm is shown in Mojave, California, U.S., Nov 8, 2019. REUTERS/Mike Blake/File Photo

As renewable energy costs have plunged and onshore wind and solar developers rushed to qualify for tax credits before they are scaled back this year, investment surged 28% from a year earlier, a report by Bloomberg New Energy Finance (BNEF) said.

This, along with a bigger jump in financing for offshore wind, helped to offset a decline in investment in the world’s biggest market, China.

The U.S. wind power tax credit has seen its value drop since 2017 and was scheduled to be phased out completely by this year The wind power tax credit is currently worth 1.5 cents for every kilowatt-hour of electricity produced. The credit’s value began dropping in 2017 and was scheduled to be phased out completely next year.

Global renewable energy capacity investment inched up by 1% to $282.2 billion last year.

“It’s notable that in this third year of the Trump presidency, which has not been particularly supportive of renewables, U.S. clean energy investment set a new record by a country mile,” said Ethan Zindler, head of Americas at BNEF.

“These technologies are more cost-competitive than ever, and the fact that there was a tax credit step-down on the horizon made the market particularly busy in 2019,” he added.

Indeed, President Donald Trump’s withdrawal of federal support for Obama-era climate goals indirectly helped the industry here by inspiring a backlash among U.S. cities, states and corporations, which have grown more ambitious about installing cleaner forms of energy.

Although China is still the biggest investor in renewables, the amount declined by 8% to $83.4 billion last year.

In the second half of the year there was a surge in offshore wind financing which took investment in that sector to $29.9 billion, a new record and 19% higher than a year earlier, the report said.