WASHINGTON — In a sharp rebuke, a federal judge on Friday reversed a decision by the Environmental Protection Agency to revoke a critical permit for one of the nation’s largest mountaintop removal mining projects.

The United States District Court judge, Amy Berman Jackson, said that the E.P.A.’s unilateral decision in January 2011 to rescind the waste disposal permit for the Spruce No. 1 mine in Logan County, W.Va., exceeded the agency’s authority and violated federal law. She declared that the permit was now valid, paving the way for a mining project covering 2,278 acres to go forward.

In taking the rare step of revoking the permit, granted in 2007 by the Bush administration, the E.P.A. said that mining would have done unacceptable damage to rivers, wildlife and communities. The mine, owned by Arch Coal of St. Louis, would have buried hundreds of miles of streams under tons of residue.

The agency said at the time it was using its authority under the Clean Water Act to rescind a legally issued permit, an action it had taken only twice in 40 years and never for a coal mine.