U.S. investors don’t appear to share President Donald Trump’s doubts about renewable energy and climate change, pouring a record amount of cash into wind, solar and other clean power.

Money flowed into renewable projects last year as companies rushed to take advantage of tax credits before they are reduced this year. Renewable sector spending in the U.S. jumped 28% to $55.5 billion last year, surpassed only by investments in China, Bloomberg reported, citing a BloombergNEF report.

“It’s notable that in the 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,” Ethan Zindler, head of Americas for BNEF, told Bloomberg.

Trump has taken steps to allow vehicles and power plant smokestacks to spew more planet-warming gasses and has started the process of pulling the U.S. out of the Paris Agreement. The president has repeatedly attacked wind power while praising coal. When government scientists released the latest volume of the National Climate Assessment in 2018, Trump said, “I don’t believe it. No, no, I don’t believe it.”

The flow of money into renewable energy isn’t limited to the U.S. and China. Worldwide investment in the sector climbed 1% to $282.2 billion last year. While the increase in spending was modest, the falling costs of wind and solar power allowed for a 13% increase in wind and solar capacity to a total 180 gigawatts in 2019. Last year’s total lags behind the 2017 peak of $315 billion.

China remained the global leader in energy investment, although its investment fell 8% to $83.4 billion last year, the lowest level since 2013. European renewables dropped 7% to $54.3 billion.

Spending remains short of what’s needed if the goals set under the Paris Agreement are going to be met. The agreement aims to limit the total temperature gain since the start of the Industrial Revolution to two degrees Celsius. In order to meet the goal, the world should have invested about $580 billion in green energy annually between 2017 and 2020 and will need to invest $600 billion annually between 2021 and 2025, according to BNEF’s 2017 New Energy Outlook.