RICHMOND — A panel of federal judges has rejected permits for the Atlantic Coast natural gas pipeline to cross two national forests and the Appalachian Trail in Virginia, finding that the U.S. Forest Service “abdicated its responsibility” and kowtowed to private industry in approving the project.

The harshly worded, 60-page decision issued Thursday by three judges from the U.S. Court of Appeals for the 4th Circuit is part of a string of legal setbacks for the 600-mile pipeline. The $7 billion project, being built by a consortium of companies led by Dominion Energy, is intended to carry natural gas from West Virginia through Virginia and into North Carolina.

“We trust the United States Forest Service to ‘speak for the trees, for the trees have no tongues,’ ” the ruling said, quoting “The Lorax,” a 1971 Dr. Seuss book. “A thorough review of the record leads to the necessary conclusion that the Forest Service abdicated its responsibility to preserve national forest resources.”

The ruling, written by Judge Stephanie D. Thacker and joined by Judge James A. Wynn Jr. and Chief Judge Roger L. Gregory, ­noted that the Forest Service had raised proper environmental questions early in its permit process. But those issues “were suddenly, and mysteriously, assuaged in time to meet a private com­pany’s deadlines,” Thacker wrote.

The judges ordered the Forest Service to vacate and reconsider permits for the pipeline to cross parts of the George Washington and Monongahela national forests, and the panel said the agency did not have authority to grant right of way for the pipeline to cross the Appalachian Trail.

“We strongly disagree with the court’s ruling,” pipeline spokesman Aaron Ruby said Thursday via email. “Under Democratic and Republican administrations alike, for decades 56 other oil and gas pipelines have operated across the [Appalachian Trail]. This opinion brings into question whether or not these existing pipelines can remain in place.”

Ruby said Dominion and its partners will immediately appeal the decision. “If allowed to stand, this decision will severely harm consumers and do great damage to our economy and energy security,” he said.

Lawyers for the Southern Environmental Law Center who brought the case hailed it as a major victory.

“The story here is Dominion went over the agency’s head to apply political pressure on the decision,” said Greg Buppert, a lawyer with the SELC. “They went to people in the Trump administration. . . . Dominion has used influence, money and politics to bend the rules for the Atlantic Coast Pipeline, and that plan has backfired.”

In the ruling, the judges note that in October 2016, the Forest Service told the pipeline builders to submit 10 possible routes to compare environmental impacts. Much of the pipeline’s route through the national forests was on steep slopes that posed unusual engineering challenges.

By December, the pipeline builders turned in only two routes. Both involved crossing the Appalachian Trail on Forest Service property — explicitly chosen “to avoid the need for congressional approval” to cross the trail in other locations, the judges wrote.

That’s because other locations would have been on National Park Service property, and the Park Service had said it could not grant approval without permission from Congress.

Around that time, the pipeline builders also submitted a strict schedule for getting federal permits so they could begin construction. As the process went forward, the Forest Service dropped its demand to review the other eight routes to see if there were viable alternatives to disrupting the national forests, enabling Dominion to stick to its schedule.

“The Forest Service approved the pipeline without information it previously determined was necessary to making its decision, and it did so without acknowledging, much less explaining, its position,” the judges wrote. They called the turnabout “particularly puzzling” and said the record of events suggests that approving the project “was a preordained decision.”

The judges also ruled that the Forest Service had no authority to grant permission to cross the Appalachian Trail because the trail itself is under control of the National Park Service and the Interior Department.

The pipeline has to cross the trail somewhere, and Dominion got no other spots approved as backup. Fixing that now would require an act of Congress, said Buppert, the environmental lawyer. “The entire project is premised on this one point,” he said.

Ruby, the spokesman for the pipeline, said the court is mistaken.

“With this decision, the 4th Circuit has now undermined the judgment of the dedicated, career professionals at nearly every federal agency that has reviewed this project,” he said. “We are confident we will prevail on appeal.”

Work on the entire length of the Atlantic Coast Pipeline was halted this month after other federal judges delayed permits from the U.S. Fish and Wildlife Service over the impact on endangered species.

There were other stoppages over the summer related to the contested permits.

The project also faces a crucial test next week when the Virginia Air Pollution Control Board considers a permit for a compressor station in Buckingham County.

The Atlantic Coast Pipeline is one of two major gas pipeline projects in Virginia. The other is the 300-mile Mountain Valley Pipeline, which also runs from West Virginia to North Carolina. It crosses the far southwestern portion of Virginia and has faced similar legal problems — including a suit filed last week by Virginia’s attorney general — although construction work is further along.

The Mountain Valley Pipeline faced a challenge of its own Thursday when Virginia’s State Water Control Board voted to reconsider a crucial permit because of the violations cited in the attorney general’s lawsuit.