New Jersey Gov. Phil Murphy, a Democrat, signed a bill Wednesday saving three struggling nuclear power plants in the state.

The legislation, approved by the state’s Democratic legislature, would require utility customers to spend more than $300 million a year to rescue nuclear power plants run by Exelon and Public Service Enterprise Group.

Murphy signed the nuclear legislation as well as measures boosting wind and solar energy, mandating that half the state’s energy come from renewable energy by 2030.

“To reach our clean energy goals, we will need to keep these plants open and safely operating,” Murphy said at the bill signing, noting that New Jersey’s nuclear plants support 5,800 jobs.

The move to subsidize nuclear plants in New Jersey comes as the Energy Department is considering declaring a grid emergency over the planned closures of coal and nuclear plants in the Midwest, which are struggling to compete with less expensive natural gas and renewables.

Energy Secretary Rick Perry is expected to make a decision soon on whether to grant a petition from Ohio utility FirstEnergy under section 202(c) of the Federal Power Act, which gives him the authority to direct the "temporary" continued use of power plants in circumstances that include war, energy shortages, or sudden surges in demand.

The measure is not meant to be used for economic reasons. FirstEnergy’s coal and nuclear divisions recently filed for Chapter 11 bankruptcy protection.

Nuclear has drawn more sympathy from policymakers than coal, because it emits no carbon dioxide, a greenhouse gas that most climate scientists blame for driving manmade climate change. Illinois and New York also have moved to compensate nuclear plants for their zero-carbon value.

New Jersey, with the other states, adopted zero-carbon energy credits, in which the state issues credits to nuclear plants for generating carbon-free power, which they can sell on the open market to raise revenue.

Nuclear advocates cheered New Jersey’s new law and warned other states with ailing nuclear plants to act.

Ohio considered a similar proposal, but it failed to advance, and no such mechanism exists in Pennsylvania, the two states where FirstEnergy’s closing plants operate.

“Nuclear plants play pivotal roles in New Jersey’s economy and environment, and Gov. Phil Murphy is to be commended for signing into law today a Zero Emissions Credit program to help preserve these critical energy assets,” said Maria Korsnick, president and CEO of the Nuclear Energy Institute, the industry’s main trade group.

“New Jersey is the latest state to act to preserve our nation’s largest source of resilient and reliable, carbon-free energy. Policymakers in Ohio and Pennsylvania should follow the leadership that New Jersey has demonstrated and act expeditiously to preserve nuclear plants in their states.”

The U.S. depends on the nation’s 99 nuclear reactors for 60 percent of its carbon-free electricity.

The U.S. power grid faces the potential loss of more than 228,000 gigawatt hours of carbon-free nuclear generation because of nuclear plant closures, according to an April report from ScottMadden Management Consultants.

Some clean energy advocates and climate hawks, however, argue that wind and solar, which have seen huge reductions in development costs, are ready to replace nuclear power. They also worry about the safety of nuclear power plants.

Most of America’s new power-generating capacity over the past two years has been wind and solar.

“Today, Gov. Murphy has sold out the ratepayers by signing this greenscam bill,” Jeff Tittel, director of the Sierra Club’s New Jersey chapter said. “All they’re doing with this bill is enriching PSEG at the expense of clean energy.”