The Obama administration’s decision last year to revoke a permit for a huge mine in West Virginia inspired hope that mountaintop mining, which has caused immense environmental damage across Appalachia, would soon be coming to an end. Now a Federal District Court judge in the District of Columbia has ruled that the Environmental Protection Agency exceeded its legal authority in blocking the mine. The administration must appeal. The Clean Water Act is on its side, as are the people of West Virginia.

Mountaintop mining is a highly efficient and hugely destructive form of strip mining that blasts apart mountain ridges to expose the coal seams underneath. The resulting rubble is then dumped into the valley and streams below. Thousands of miles of streams in Appalachian coal country have already been obliterated in this way.

The Spruce No. 1 mine project in Logan County, W.Va., would have covered 2,278 acres and ruined six more miles of high-quality streams. It received a final permit to proceed from the Army Corps of Engineers in 2007. Lawsuits followed, and, in January 2011, the E.P.A. revoked the permit on grounds that the mine would cause unacceptable environmental damage. The E.P.A. had blocked corps projects before. But this was the first time it had rescinded an approved mining permit and was part of the administration’s broader campaign to limit mountaintop mining by reviewing old permits and tightening standards for new ones.

Judge Amy Berman Jackson said the agency had resorted to “magical thinking” in claiming that the Clean Water Act gives it the power to retroactively rescind a permit. But Section 404 of the law gives the agency broad authority to protect water quality, including the “withdrawal” of permits “whenever” it determines that they will have an “unacceptable adverse effect” on the environment.