In a scalding opinion issued on Thursday, Judge Royce Lamberth of Federal District Court rejected new rules imposed by the Obama administration last spring that limit access to counsel for prisoners at Guantánamo Bay, Cuba, who are not actively challenging their detention.

Calling the government’s position an untenable challenge to the separation of powers, he said the administration had improperly given itself “final, unreviewable power to delay, hinder or prevent access to the courts, ” which amounted to “executive fiat.”

Under the new rules, those not challenging their detention would not be guaranteed access to their lawyers. Instead, the military commander of Guantánamo would have “authority and discretion” to decide whether they could meet, and about other matters, like whether lawyers would have access to their own files containing classified information.

The judge wrote, “It is clear that the government had no legal authority to unilaterally impose” the new rules. He declared them null and void, saying the court would not abdicate “its great responsibility to guarantee that its doors remain open to these detainees.”