Opponents to the Cape Wind project have suffered another setback, with a new court ruling dismissing a series of complaints related to the state’s jurisdiction in assessing the project.

Barnstable Superior Court Judge Robert Kane ruled in favor of Cape Wind Associates, and struck down four of five counts brought by the town of Barnstable, the Alliance to Protect Nantucket Sound and a group of individuals, who had claimed the state’s review of the project’s impact was inadequate.

On the remaining count, Judge Kane ruled that the matter was still pending with a state agency, and there could be no challenge until that process was complete.

The decision is complex, in part because of the geography of the project.

Cape Wind Associates LLC want to build 130 wind turbine generators over 25 square miles on Horseshoe Shoal, in federal waters in Nantucket Sound. But there also will be 25 miles of underwater cable connecting it to the NStar facility at Yarmouth, which is within state jurisdiction.

The opponents argued that last year, when the state Executive Office of Energy and Environmental Affairs approved the project it did so on the basis of an inadequate assessment under the Massachusetts Environment Policy Act, which did not include those on the part of the project in federal waters.

State secretary of energy and environmental affairs Ian Bowles, they argued, had improperly limited the scope of that assessment.

But Judge Kane found Mr. Bowles’s “jurisdictional determination was correct as a matter of law.”

Cape Wind welcomed the outcome, with company president Jim Gordon saying: “The court rejected the opponents’ primary argument and agreed that Massachusetts agency review was proper.”

While a number of other legal actions are ongoing, the decision brings the seven-year controversy about the project a little closer to conclusion.

The largest hurdle still before the proponents is the final determination of the lead federal permitting agency, the Minerals Management Service.

It produced a generally favorable draft environmental impact statement at the start of this year, and subsequently took some 4,200 submissions, both in writing and at a series of public hearings.

A final federal EIS is due around November, and is expected to be followed by yet more legal challenges.