After months of debate and numerous changes, state lawmakers passed a controversial bill to give New Jersey's largest utility company hundreds of millions of dollars through a new subsidy that will be paid by Garden State utility customers.

The bill (A3724) has come under fire from environmental groups and consumer advocates. It provides a $300 million per year subsidy for two nuclear power plants operated by PSEG, the state's largest electric utility. Although PSEG owns the nuclear plants, customers from all public utilities in N.J. will have to pay about $41 per year for the program.

The measure -- sponsored and championed by state Senate President Stephen Sweeney, D-Gloucester -- passed by a 29-7 margin in the Senate and a 59-10 margin in the state Assembly, with one abstention.

The measure now goes to Gov. Phil Murphy for his signature or veto.

The legislature also passed a second bill (A3723) that will also have a direct impact on New Jersey energy's future. It sets new standards for green energy in the state, and creates new programs to help the state reach those goals.

Specifically, the bill mandates that the state get 50 percent of its electricity from green sources by 2030. The bill passed the Senate by a 29-8 margin and the Assembly by a 50-20 margin, with two abstentions. That measure is also headed to Murphy's desk.

The direct beneficiaries of the nuclear subsidies are the Hope Creek Nuclear Generating Station and the Salem Nuclear Power Plant, two PSEG-owned nuclear power plants located at the same site in Lower Alloways Creek.

Salem Nuclear Power Plant is co-owned by Exelon, the same company that owns Oyster Creek Nuclear Generating Station in Lacey Township, the state's only other nuclear power plant. Oyster Creek is scheduled to close this October.

Supporters of the nuclear subsidy have said the measure is necessary to keep the nuclear plants afloat as they struggle to compete economically with the growth of cheap natural gas.

In March, PSEG filed a notice with the Securities and Exchange Commission that the company, along with Exelon, will stop investing in capital improvements for the nuclear plants unless it got the state subsidies.

"We do not make frivolous SEC filings," said Joe Delmar, a spokesman for PSE&G Nuclear, said at the time.

But opponents of the bailout measure argue that PSEG's nuclear plants are still profitable, and this new subsidy is unnecessary.

"The whole bill is just an excuse to subsidize the nuclear power plants," Jeff Tittel, director of the New Jersey Sierra Club, said in a statement. "PSEG are getting $300 million a year whether they need it or not."

New Jersey Rate Counsel Director Stefanie Brand, the official advocate for Garden State ratepayers, has opposed the new subsidy since its initial proposal.

"In sum, this is a 'heads I win, tails you lose' situation for PSEG," Brand said in a testimony to the Senate budget committee last week. "It puts all the power and benefits on PSEG's side of the ledger, allowing it to determine what it is entitled to earn, whether other programs provide enough assistance, and even its own eligibility."

Brand added that she has not seen evidence that the subsidy is needed to keep the nuclear power plants profitable.

"There has been no demonstration that PSEG's nuclear plants are in financial difficulty other than bald assertions and ultimatums issued by the company," Brand said.

Brand pointed out in her comments that New Jersey ratepayers will effectively be subsidizing ratepayers in other states, because the electricity generated by New Jersey's nuclear power plants serves places like Delaware, Maryland and Pennsylvania as well.

THE CLEAN ENERGY BILL

While the nuclear subsidy will keep existing plants open in the short-term, the accompanying bill is meant to steer New Jersey to a clean energy future. The bill is supported by the state's solar energy industry and environmental groups like the New Jersey Conservation Foundation and the New Jersey League of Conservation Voters.

"The New Jersey legislature took a major step today toward protecting thousands of solar jobs that were at risk," said Sean Gallagher, Solar Energy Industries Association's vice president of state affairs, in a statement. "This bill will enable many more New Jersey residents, businesses and communities to access solar energy."

But some environmental groups don't think that the clean energy bill goes far enough, and serves more to "greenwash" the nuclear subsidy than actual transition the Garden State to clean energy.

"Governor Murphy campaigned on pushing the state to 100 percent clean, renewable energy," said Lena Smith, a policy advocate for Food & Water Watch, in a statement. "He should reject this half-measure, and work with lawmakers to build support for the NJ Off Fossils Act, introduced by Assemblyman Tim Eustace (A1823) and Senator Patrick Diegnan (S1405). These bills aim to get us to 100% renewable power by the year 2035, making them the most ambitious climate bills in the history of New Jersey. It's time to think big."

NJ Advance Media staff writer Brent Johnson contributed to this report.

Michael Sol Warren may be reached at mwarren@njadvancemedia.com. Follow him on Twitter @MSolDub. Find NJ.com on Facebook.