ALBANY — The State Legislature has approved a measure that expands core pine barrens designation to a combined 1,000-plus acres in Shoreham and Mastic in a move local environmentalists hailed as a victory for preservation over green-energy development in woodlands.

The bill passed 60-2 in the Senate and 139-4 in the Assembly late Monday night.

Gov. Andrew M. Cuomo must sign or veto it by the end of the year. Representatives for Cuomo didn’t immediately respond to a request for comment Tuesday.

The measure would effectively scuttle plans to erect tens of thousands of solar panels on 350 acres near the shuttered Shoreham nuclear power plant. It would have the same impact on a planned 100-acre solar farm in Mastic, near the headwaters of the Forge River.

Assemb. Steve Englebright (D-Setauket), who sponsored the bill along with Sen. Kenneth LaValle (R-Port Jefferson), called its passage an important step in protecting “pristine coastal forest” in Shoreham.

“It’s a museum piece,” Englebright said. “To knock down hundreds of acres of primeval forest to put up solar panels is not appropriate.”

LaValle said, “This is the first major addition we are making to the pine barrens core,” he said.

Solar developers and a builders group opposed the bill, and at least one environmental group, Citizens Campaign for the Environment, supported solar projects in the woodlands, saying it was preferable to homes or warehouses.

advertisement | advertise on newsday

“We are deeply disturbed and disappointed that the legislature has moved to block solar energy development in Long Island under the misleading guise of protecting the pine barrens,” said Michael Woloz, a spokesman for Middle Island Solar Farm, which has proposed a 100-acre project in Mastic.

The Long Island Builders Institute called it “totally unreasonable” to eliminate “opportunities” to develop the land.

The bill was backed by environmental and civic groups and local officials, including the Long Island Pine Barrens Society, the Affiliated Brookhaven Civic Organization and Brookhaven’s Republican Supervisor Edward P. Romaine, who lobbied for it in the days before passage.

MaryAnn Johnson, president of the Affiliated Brookhaven Civic Organization, who opposed solar development at the sites and has sued to block the Mastic project’s approval by Brookhaven Town’s planning board, urged Cuomo to sign the bill.

“I would be profoundly disappointed if the governor didn’t do what’s right for Long Island,” she said. “I fully expect he’ll do the right thing and sign the bill.”