Wind generated the most electricity in the Texas power grid in March, according to federal energy data, with analysts at S&P Global Platts saying this was the first time wind topped gas-fired generation.

Wind generated 39% of the power in March in the Electric Reliability Council of Texas (ERCOT), the state's grid operator, according to the U.S. Energy Information Administration.

That compares with 30% for gas, 15% for coal, 12% for nuclear and 4% for solar.

The wind record comes after generators of all sorts failed to keep the lights on for millions in ERCOT in mid-February when frigid weather boosted heating demand well above the grid’s forecasts at the same time freezing pipes left gas-fired power plants without enough fuel and wind turbines frozen.

In February, gas generated 46% of the power in ERCOT with the rest coming from wind (21%), coal (19%), nuclear (12%) and solar (2%).

Analysts at S&P Global Platts said gas would likely take market share back from wind in coming months as demand for air conditioning rises this summer. Demand in Texas for both heating and cooling is usually low in March.

As the nation transitions from dirty fossil fuels like coal to cleaner forms of energy like wind and solar to stop global warming, gas—the cleanest fossil fuel—is currently the best energy source available in most states to keep the lights on by balancing the intermittent nature of wind and solar.

Gas plants can ramp up and down based on demand but wind and solar can provide energy only when the wind is blowing or the sun is shining. The use of batteries and other energy storage devices, which can also provide power when needed, is growing but remains far too small to replace gas-fired generation at present.