New Jersey residents could see their energy bills rise up to $41 annually to help bail out nuclear power plants under legislation lawmakers unveiled Friday, part of an effort the state's biggest energy company says is needed to rescue a major part of the state's energy grid.

PSEG said that its two nuclear plants account for between 40 and 50 percent of electricity production in New Jersey, but are in danger of becoming financially unviable within two years. They said that would cost the state 1,600 jobs.

The company estimates ratepayers could pay up to almost $31 annually under the legislation. Another estimate from the New Jersey Division of Rate Counsel, an independent advocate for consumers appointed by the governor, put the figure at closer to $41 a year.

The estimates mean the measure could carry an overall cost of roughly $240 million to $320 million annually.

The financial rescue effort, which has been done in other states like New York and Illinois as well, has garnered significant opposition from consumer groups and environmental organizations.

"This bill is a direct subsidy from the ratepayers hidden in gobbledygook," said New Jersey Sierra Club director Jeff Tittel.

A spokesman for PSEG said the company welcomes the legislation and said it would continue talking with lawmakers about the proposal as it advances.

"We're happy that New Jersey lawmakers have recognized the urgency of the matter," PSEG spokesman Michael Jennings said. "We're pleased that they have taken the time to listen and understand the nature of the problem."

Jennings also said the cost of the rescue package would fall below what the company estimates ratepayers would face if nuclear plants closed.

The legislation establishes what it calls nuclear diversity certificate under the state's utility regulator, the Board of Public Utilities.

Among the requirements under the legislation, nuclear plants would have to show they make a significant contribution to energy diversity in the state, turn over financial data showing that a particular plant faces closing, and certify annually that the plant does not get other federal or regional subsidies or credits. Nuclear operators would also have to pay up to $250,000 for an application fee.

In return, the legislation would require the state's electric utilities to pay nuclear power plants that receive the diversity certificates. The bill sets that cost at four-tenths of a penny per kilowatt hour. The rate counsel says average usage is around 850 kilowatt hours a month. PSEG put the figure at closer to 650 kilowatt hours.

But the legislation includes a formula that says payment would cover the number of certificates multiplied by the percentage of electricity the utility distributed in the state compared to other utilities.

New Jersey has three nuclear facilities, two of which are operated by PSEG. A third, Oyster Creek, is run by Exelon and slated to close in 2019.

The legislation comes as Republican Gov. Chris Christie prepares to turn power over to Democratic Gov.-elect Phil Murphy and as lawmakers get set for a new session, including a new Assembly speaker.

The lame-duck period can include complicated, last-minute legislation that officials hope to rush through, mostly because there's no election hanging over them, experts say.

The legislation comes as the Trump administration pushes for regulations to protect the coal and nuclear industries, and as the regional marketplace that New Jersey is part of, known as PJM, is also considering protections for nuclear.

A TV, radio and online ad campaign has also emerged surrounding the issue in New Jersey, with PSEG financing commercials touting the value of nuclear power and the AARP backing ads showing people concerned over higher utility bills.

A joint Assembly-Senate hearing on the legislation is set for Wednesday.