CONCORD, N.H. – New Hampshire’s largest utility on Thursday announced it will sell off its fleet of power plants after months of negotiations with state officials, saying it will save customers at least $300 million.

Eversource Energy will sell its nine Public Service Company of New Hampshire hydro facilities and three fossil fuel plants, including the Merrimack Station in Bow, Newington Station and Schiller Station in Portsmouth.

Eversource says the sale of the PSNH plants means customers will no longer be responsible for paying for the continued operation of the plants, and will avoid potentially costly investments to meet environmental standards.

The deal also says the company can recover all but $25 million of the $422 million it spent on a scrubber it was required to install to reduce pollution. The state’s Public Utilities Commission had been formally reviewing the issues of plant divestiture and the scrubber recovery costs, and Thursday’s deal appears to head off any legal wrangling.

“This agreement represents an opportunity to create real savings for PSNH customers, avoids protracted litigation with uncertain outcomes for all parties, and moves the operation of PSNH generating plants to competitive markets rather than remaining an ongoing ratepayer obligation,” said Senate Majority Leader Jeb Bradley, who led the negotiations with the company.

Once the plants are sold, Eversource will buy energy for its New Hampshire customers in the open market, consistent with all other utilities in the state and across the region.

Marc Brown, president of the New England Ratepayers Association, said there might be short-term gain for consumers, but he fears selling off the plants could ultimately push costs up.

“Our concern is that if they move forward with divestiture and those plants get shut down, that’s going to increase our reliance on natural gas and reduce diversity of energy sources in the region,” Brown said. “It could be really bad for the ratepayer.”

A year ago, staff of the Public Utilities Commission said customers of what was then PSNH would be better off if the company sold off the power plants. Ultimately, the staff report said, the company would be charging more than its competitors and passing the higher rates on to a shrinking number of customers as people looked for cheaper options.

The PUC report said the plants have a total value of some $660 million, but would probably fetch about $225 million on the open market, leaving $435 million in so-called stranded costs to be paid by consumers.

Other terms of the deal include:

 The plants must operate for at least 18 months following their sale.

 Employees affected by the sale would be protected by current collective bargaining agreements. Non-represented employees would also be protected.

 Communities that host power plants would receive three years of payments in lieu of taxes if the purchase price is less than the assessed value.

 The distribution rate freeze would extend until at least July 2017.

 A clean energy fund would be established with $5 million in seed money from Eversource shareholders.