The New York State Department of Environmental Protection scored a win in an appeals court Friday when a judge ruled in favor of the agency’s decision to grant water quality permits for a controversial gas pipeline.

The Second Circuit Court of Appeals issued a summary order against environmental advocacy groups, dismissing their lawsuit. The court found the DEC acted reasonably when it awarded Transco water quality permits for its Northeast Supply Enhancement project, even though it had denied permits for the project three times in prior years.

The DEC “subjects applications for environmental permits to a transparent and rigorous review process to protect public health and the environment,” Dana Ferine, a spokesperson for the DEC, said in a statement about the ruling. “DEC is committed to closely monitoring the proposed [NESE] pipeline project’s construction and adherence to all permit conditions to ensure the full protection of New York’s waterways.”

More context: The controversial pipeline project that would transport natural gas from Pennsylvania to downstate New York looked all but dead after environmental regulators in New York and New Jersey denied the project’s applications for water quality permits in prior years.

But it was revived under the Trump administration, which has been pushing fossil fuel development over renewables. In April, the White House sent an all-star cast of officials to a groundbreaking ceremony for NESE, touting its ability to lower energy prices.

Gov. Kathy Hochul’s administration was key in allowing the pipeline’s revival. President Donald Trump claims that Hochul “caved” when pressured to give the go-ahead to the pipeline project in return for allowing an off-shore wind project to resume construction. Hochul denies that any pipelines-for-wind deal was made.

The ruling is a blow to environmental advocacy organizations that sued over the permitting.

“The last thing we need is a gas pipeline that will raise bills and harm our environment.,” Earthjustice Managing Attorney Susan Kraham, who represented environmental groups in the case, said in a statement. “DEC was right to reject the NESE pipeline project three times because it could not comply with the states’ water quality standards. It should have done so again.”

Looking ahead: The project is still facing other active legal challenges, including a similar lawsuit in the Third Circuit Court of Appeals challenging the New Jersey Department of Environmental Protection’s issuance of water quality permits for the project. That case was argued in July.

Environmental groups are also suing the New Jersey Tidelands Resource Council in state court over its decision to grant the project a utility license.

The Federal Energy Regulatory Commission is facing a court challenge in the D.C. Circuit over its decision to revive the pipeline project.