VINALHAVEN, Maine — The state high court overturned a lower court ruling Thursday that had chastised the Department of Environmental Protection’s commissioner for loosening noise requirements for the island’s wind turbines.

The Maine Supreme Judicial Court ruled that DEP’s decision to enter into an agreement with Fox Islands Wind rather than push for more conditions was supported by substantial evidence and was within the agency’s discretion.

The ruling was a blow to neighbors who had complained that the three nearly 400-foot-tall wind turbines, erected in 2009, were exceeding noise standards.

The ruling overturned a March 2014 ruling by Superior Court Justice Michaela Murphy in Kennebec County. The high court heard arguments on the issue in December.

Murphy had criticized DEP Commissioner Patricia Aho for participating in the department’s handling of the Fox Islands Wind case.

Aho had worked for Pierce Atwood LLC before being appointed deputy DEP commissioner and then acting commissioner on June 20, 2011. Pierce Atwood represents Fox Islands Wind.

Aho overrode DEP staff and an outside consultant’s recommendation 10 days after she became acting commissioner.

“That issue, which could have been avoided, has created an enormous amount of mistrust by the [Fox Islands Wind] neighbors as to whether their grievances can receive fair treatment by the commissioner and the department,” Murphy stated in the conclusion of her 2014 ruling.

The high court, however, found that it was within the DEP’s authority to enter into an agreement with the power utility.

“The petitioners do not complain that DEP refused to take any enforcement action; rather, they complain that DEP’s action did not go far enough. This goes to the essence of prosecutorial discretion: agencies have a great deal of discretion when it comes to enforcement of the laws under their jurisdiction,” the high court ruled.

The high court justices also concluded that the DEP did not violate the neighbors’ First Amendment rights by retaliating against them for complaining about the lack of DEP action. The court did conclude, however, that the court had the authority to review the DEP’s enforcement actions. The DEP had argued at the December hearing before the Supreme Court that the action by the DEP was not reviewable by the court.

The DEP issued a statement Friday indicating it was pleased with the decision that supported the department’s decision and its “substantial work regarding the Fox Islands Wind case.”

Attorney Rufus Brown, who represented the neighbors, did not return an email request for comment on Friday.