A federal judge ruled Thursday that certain detainees held at a U.S. military base in Afghanistan have the right to challenge their imprisonment in U.S. court.

Judge John Bates of the U.S. District Court for the District of Columbia ruled that non-Afghani prisoners detained at the Bagram Theater Internment Facility outside Kabul could press habeas corpus cases before American judges.