A federal judge said the Bush administration must release 17 detainees from Guantánamo Bay, rebuking the White House for denying prisoners in the “war on terror” basic legal protections. In the first such order after seven years of legal wrangling, Judge Ricardo Urbina said the administration was not free to ignore the writ of habeas corpus, which guarantees prisoners the right to answer charges in court.

The order applies to 17 members of the Uighur Muslim minority in western China. The government says the men admitted to receiving training in Taliban-controlled Afghanistan at the time of the Sept. 11, 2001, attacks. The administration no longer considers them enemy combatants, but says that if Urbina’s order is allowed to stand, it could be cited as a precedent by other detainees, including “sworn enemies of the United States.”