The Massachusetts Supreme Judicial Court struck down a controversial "pipeline tax" that would have allowed electric utilities in the state to raise rates to pay for natural gas pipeline projects.

The decision is a setback for pipeline company Spectra Energy and its proposed Access Northeast project, which would have significantly increased the flow of natural gas along an existing pipeline from New Jersey to eastern Massachusetts.

The ruling comes on the heels of several other favorable developments for renewable energy. In May, the same court upheld the state's Global Warming Solutions Act, which mandates an 80 percent reduction in greenhouse gas emissions from 1990 levels by 2050.

Massachusetts Gov. Charlie Baker signed legislation on Aug. 8 that requires local utilities to get 1,600 megawatts of their combined electricity from offshore wind farms by 2027.

"I think it's a potentially historic turning point," David Ismay, an attorney with Conservation Law Foundation, a Massachusetts based environmental advocacy organization, said of the combined rulings and legislation. Ismay was the lead attorney for CLF, one of two parties that filed suit against the state's Department of Public Utilities (DPU), which had initially allowed a rate increase to pay for the $3 billion project.

"I think it's a shot across the bow of the fossil fuel industry," Ismay said. "If they are smart, they are waking up and thinking how they can get into offshore wind."

Spectra Energy said the decision will cost state taxpayers in the long run.

"While the Court's decision is certainly a setback, we will reevaluate our path forward and remain committed to working with the New England states to provide the infrastructure so urgently needed for electric consumers," Spectra spokesperson Creighton Welch said in a statement. "This decision leaves Massachusetts and New England in a precarious position without sufficient gas capacity for electric generation during cold winters. The lack of gas infrastructure cost electric consumers $2.5 billion dollars during the Polar Vortex winter of 2013 and 2014."

Massachusetts' attorney general Maura Healey concluded in a report published in November that the added capacity is not needed to meet electricity generation needs.

Healey argued in favor of Conservation Law Foundation in their suit against the DPU.

This week's ruling by the court declared it unlawful for Massachusetts to require residential electricity customers to finance the construction of gas pipelines by private companies, which the DPU had previously allowed.

The decision only affects funding from electricity ratepayers in Massachusetts and not funding for the project from other states. But Massachusetts' ratepayers were projected to provide about half the project's revenue, according to DPU filings.

"I don't see how this project goes forward," Ismay said.