Dominion Energy, one of the nation’s largest utilities, recently erected wind turbines off Virginia — only the second such installation in the U.S. — as part of a big bet on renewable energy.

The company is also planning to build power plants that burn natural gas.

Utilities around the country are promoting their growing use of renewable energy like hydroelectric dams, wind turbines and solar panels, which collectively provided more power than coal-fired power plants for the first time last year. But even as they add more green sources of power, the industry remains deeply dependent on natural gas, a fossil fuel that emits greenhouse gases and is likely to remain a cornerstone of the electric grid for years or even decades.

Utilities say they need to keep using natural gas because the wind and the sun are too unreliable. “We’ve got to have a resource that has an ‘on’ and ‘off’ switch,” said Katharine Bond, a Dominion vice president.

For years, environmental activists and liberal policymakers fought to force utilities to reduce coal use. The battle lines are rapidly shifting, with the proponents of a carbon-free grid facing off against those who champion natural gas, an abundant fuel that produces about half the greenhouse gas emissions that burning coal does.

Coal plants supply less than 20% of the nation’s electricity, down from about half a decade ago. Over that same time, the share from natural gas has doubled to about 40%. Renewable energy also has more than doubled to about 20%.

Experts argue that the surge in wind and solar energy is not reducing emissions quickly enough to avert the worst effects of climate change, including more intense heat waves and storms. They argue that utilities urgently need to reduce the use of natural gas, too.

“Replacing coal with gas doesn’t solve our public health problem,” said Mary Anne Hitt of the Sierra Club.

Proponents of renewable energy note that solar panels are increasingly the cheapest source of electricity. Some lawmakers argue that utilities are wasting billions of dollars by investing in natural gas plants that will have to be shut before their useful lives end.

“The urgent need to address the climate crisis means we can’t make reckless investments now that will have to be paid off for decades,” said Sen. Edward J. Markey, D-Mass., one of the authors of the legislation known as the Green New Deal. “We have to consider clean options, which … are also cost-effective.”

Some experts say they hope that the country can move away from fossil fuels even as the Trump administration has repealed environmental regulations. “Fighting the transition is not going to stop the transition,” said Dennis Wamsted, an analyst for the Institute for Energy Economics and Financial Analysis. “Economically, it will happen inevitably.”