A plan to have Maine electric consumers underwrite a contract to help pay for expanded natural gas capacity in New England suffered a major setback Wednesday when a court in Massachusetts ruled against a similar proposal in the Bay State.

The Massachusetts Supreme Judicial Court ruled against the state’s Department of Public Utilities’ requirement that electricity customers help subsidize construction of private gas pipelines. The court said private companies should bear all the financial risks.

Reaction came swiftly in Maine, where the Public Utilities Commission last month gave conditional approval for a similar measure. After two years of study, Maine regulators decided that subsidizing new supply would benefit residents overall by lowering natural gas and electricity rates.

Tony Buxton, a lawyer who lobbies for natural gas expansion and represents Maine manufacturers that use a lot of energy, said Wednesday’s action in Massachusetts is a serious defeat for New England electricity and natural gas consumers, who are burdened by billions of dollars in unnecessarily high winter energy costs triggered by tight natural gas supplies.

“This shortage and the high energy prices it causes has been confirmed by over 30 studies by state government, utilities and consumer groups,” said Buxton, who represents the Industrial Energy Consumer Group and the Coalition to Lower Energy Costs. “Maine pays about 10 percent of these windfall costs, or some $200 to $300 million a year.”

The decision also is a blow to the priorities of Gov. Paul LePage, whose administration has promoted natural gas expansion as a key to lowering the state’s electricity costs.

The region’s environmental groups applauded Wednesday’s ruling, saying that propping up fossil fuels slows New England’s transition to an economy driven by renewable power and high efficiency.

This position led the Boston-based Conservation Law Foundation to join the challenge in Massachusetts and the appeal to the state’s high court.

The Massachusetts court case specifically involved a $3 billion pipeline expansion project called Access Northeast. The developer, Spectra Energy Corp., is proposing to upgrade an existing pipeline system, add liquefied natural gas storage and bring more gas to the region’s power plants. Two utilities in Massachusetts are partners in the project.

Access Northeast was endorsed by two of Maine’s three PUC commissioners in the agency’s approval of pursuing pipeline capacity here.

On Wednesday, a Conservation Law Foundation attorney in Maine said the Bay State court decision means that Maine’s PUC should reconsider its approval.

Maine’s action was conditioned on four other New England states taking similar action, noted Ben Tettlebaum, a staff attorney in Portland. Massachusetts, which uses the most natural gas in the region, was the pivotal state in any plans for ratepayers underwriting pipeline expansion through their power rates.

“With that state out of the picture, prospects for a regional gas pipeline expansion are slim to none,” Tettlebaum said. “No other party is willing to take the significant risk of entering into a long-term contract for a gas pipeline, which is why Maine has tried to saddle electric ratepayers with this gamble.”

Despite the Massachusetts ruling, Maine’s PUC is expected to issue a final order in its case, said Mitchell Tannebaum, the agency’s general counsel.

Tannenbaum also noted that if the Access Northeast project is canceled, Maine could endorse a second, smaller project that bid into the PUC request for new pipeline capacity. Called Continent to Coast and offered by the Portland Natural Gas Transmission System, it would transport gas from Canada and the United States into the interstate pipeline network in Westbrook. The commission may need to hold new deliberations if it pivots to that alternative, he said.

Natural gas is used to generate roughly half the electricity in the region. But as demand for gas grows, there’s not enough room in existing pipelines on the coldest winter days for generating power, manufacturing and heating.

Amid a fast-changing energy landscape, in which low oil and gas prices, and competing pipeline projects confounded past assumptions, regulators have been trying to predict whether making consumers help pay for more gas will translate into lower wholesale electric prices, and in turn, lower electric rates.

The idea is that adequate gas supply in the winter, when demand is high for both heating and power generation, will keep wholesale energy prices from spiking to levels that are well above the national averages.

Maine lawmakers ordered the PUC to take up the capacity issue.

The bill that set the PUC study in motion directed the agency to study whether it made sense for ratepayers, through utility contracts, to buy up to 200 million cubic feet of natural gas, at an annual cost of no more than $75 million.

It did not, however, clarify how much customers might pay on their bills, or when contracts might be signed, because there was no way to know that. Any action would first need written approval from Maine’s governor.

The PUC vote ran counter to a recommendation from the agency’s staff. The staff concluded that low oil and gas prices, new pipelines under construction or being permitted, and other factors could temper winter price spikes in wholesale natural gas without ratepayers getting involved.