Gates' efforts to close the prison were headed off by the Justice Department, which said that moving the prisoners to the United States would give them broad rights to appeal to civilian courts.
The issue at the heart of administration debates over the prison's closure -- whether those in Guantanamo have access to civilian courts -- was also at the center of Thursday's decision.
"A big argument for keeping Guantanamo open was to keep those detainees beyond the full reach of U.S. courts, and this decision rips that argument away," said Waxman, one of the former Pentagon officials.
In the last year, many of the administration's most ardent supporters of Guantanamo -- including William J. Haynes, a former Pentagon general counsel, and former Atty. Gen. Alberto R. Gonzales -- have left government.
Still, powerful advocates remain, in particular Vice President Dick Cheney and his influential chief of staff, David S. Addington.
Bush himself appeared to signal that his administration would look to limit the effect of the ruling on detainee policies, much as it has in the past.
In a news conference in Rome, he added that he might seek legislation to mitigate the decision.
Of the approximately 270 detainees, 80 face war crimes trials -- fewer than 20 of which have begun. Sixty prisoners have been approved for release but have not yet been sent home for various reasons, including because of the prospect of torture.
And about 130 are in an even murkier legal area, because the administration does not intend to charge them with war crimes yet considers them too dangerous to release. The ruling's most significant effect will be on these detainees.
Legal experts said that those captives now appear to have the same rights as any prisoner in the U.S., eliminating the need for them to be held at Guantanamo.
The 80 detainees who face trial as war criminals -- including alleged Sept. 11 mastermind Khalid Shaikh Mohammed -- face a more uncertain future.
Their new rights in civilian courts are unlikely to lead to their release. A Justice Department spokesman said war crimes trials already underway, including those for Mohammed and fellow Sept. 11 plotter Ramzi Binalshibh, would continue.
Still, the ruling is expected to bring a new rush to the courts by all detainees except the 60 approved for release.
Within hours of the ruling, defense lawyers were printing the decision in Arabic, Pashto and other languages spoken by their clients.