Sen. Bernie Sanders (I-Vt.) in New York on Monday. (Mary Altaffer/Associated Press)

CAN THE country do without nuclear power and natural gas? Sen. Bernie Sanders (I-Vt.) thinks so. But his position would set back the fight against global warming.

While campaigning in New York, Mr. Sanders has played up his opposition to nuclear power, and in particular the Indian Point power station 25 miles north of Manhattan, which provides a quarter of the city’s electricity. The plant is a “catastrophe waiting to happen,” he declared. His criticism came as little surprise; he had already promised to phase out nuclear power nationwide by steadily retiring existing reactors.

Mr. Sanders has also attacked fracking, the process of fracturing shale formations deep underground in order to extract natural gas. After years of contentious debate, New York’s state government banned the technique, which drillers use widely in neighboring Pennsylvania. As with nuclear power, Mr. Sanders was not just bowing to New York environmentalists; he had long insisted that the federal government should ban fracking across the country “if we are serious about safe and clean drinking water and clean air.”

In fact, if we are serious about global warming, we will ignore Mr. Sanders’s sloganeering.

When burned, natural gas produces about half the carbon dioxide emissions of coal. The recent fracking boom contributed to a reduction in national carbon dioxide emissions over the past several years, as utilities switched from cheap coal to now-cheaper gas. It is true that some concerns remain. Methane leaks from natural gas wells and pipelines. Many worry about drinking water near fracking operations. But the government can require drillers to address these issues without shutting the industry. It is also true that natural gas is a waystation; though it is cleaner than coal, natural gas still produces carbon dioxide emissions. Yet gas’s price and emissions profile is still attractive enough that the Environmental Protection Agency’s Clean Power Plan, the most aggressive global warming policy the country has ever had, relies on gas displacing coal to meet medium-term emissions goals.

Mr. Sanders’s rhetoric on nuclear power is even more concerning. Nuclear accounts for about a fifth of the country’s electricity, and it is practically emissions-free. Shutting down that much clean electricity generation would put the country into a deep emissions hole. Mr. Sanders argues that he will invest heavily in renewables. Yet every dollar spent to replace one carbon-free source with another is a dollar that could have been spent replacing dangerous and dirty coal plants. Under Mr. Sanders’s vision, either the country would fail to maximize emissions cuts, or it would waste huge amounts of money unnecessarily replacing nuclear plants. Unsurprisingly, the Clean Power Plan relies on nuclear, too, assuming that the country will get about the same amout of electricity from nuclear in 2030.

Mr. Sanders is right that climate change demands an aggressive response, and he is right to favor a carbon tax. He should leave it at that: put a price on carbon, insist on adequate regulation and let the market find the fastest and most efficient road to slowing the warming of the planet.