Solar power supplied more electricity to the U.S. grid than coal for the first time in May, according to data released Wednesday by global energy thinktank Ember and a separate report by the Solar Energy Industries Association and analytics firm Wood Mackenzie. The milestone comes even as the Trump administration pursues policies to prop up the struggling coal industry.

Ember said solar supplied 12.8% of the nation’s electricity in May, while coal supplied 12.2%, its fourth-lowest monthly share on record. Solar also became the third-largest source of electricity in the U.S. in May, behind natural gas and nuclear, said Nicolas Fulghum, senior energy and data analyst at Ember.

“For years solar power has risen in the US electricity mix,” Fulghum said. “At the same time, coal power has lost its status, first as the largest source in the US mix, and then gradually over the years has fallen even further.”

Coal generation hit an all-time monthly low in April and rebounded only modestly in May, Fulghum said, allowing increasing solar output to overtake it. He said he expects to see more months where solar exceeds coal before overtaking it on an annual basis in a few years.

Wind and solar combined have overtaken coal in the past, and wind alone has outpaced coal during spring months when wind speeds are higher. Ember derives its data from the U.S. Energy Information Administration.

After about two decades of essentially flat electricity consumption, U.S. demand is rising to power artificial intelligence data centers, expand domestic manufacturing, and support the electrification of transportation and heating. Fulghum said the milestones signal that solar “has staying power” at a time when federal policy is less supportive of renewables.

The Trump administration has canceled solar and wind projects, implemented policies that slowed clean energy permitting and development, and terminated $7 billion in funding intended for affordable solar projects across the U.S.

Last week, President Donald Trump announced a plan to spend nearly $700 million to support coal-fired power plants and coal exports. Trump said at a White House event that “coal’s a great business” and that “in terms of power, there’s really nothing like it.”

A White House spokeswoman, Taylor Rogers, said the administration’s policies were geared toward strengthening the country’s security. “The President has reversed the Left’s devastating policies, saved the American coal industry, prevented the retirement of more than 17 gigawatts of power, and saved lives during heightened demand periods,” Rogers said in a statement.

Martin Pochtaruk, CEO and founder of Canadian-based solar panel manufacturer Heliene, said Trump can say coal is coming back but investors will invest in whatever brings the best return, and for power generation that is solar, making it the fastest-growing fuel.

Despite federal policy favoring coal, solar has been the top source of new generating capacity for five consecutive years, according to the Solar Energy Industries Association. The group said solar and battery storage made up 91% of all new capacity built in the first quarter.

Globally, electricity generation from renewables is growing rapidly. The International Energy Agency projects renewables will become the largest global energy source, accounting for nearly 45% of electricity generation by 2030.