A US judge has dismissed a lawsuit by seven detainees at the Guantanamo Bay military base who sought to challenge the legality of their detention.
The US naval base at Guantanamo Bay holds around 550 inmates
It comes as Cuba, where Guantanamo is based, formally protested to the US over the treatment of prisoners there.
Judge Richard Leon ruled it was up to the US Congress, not the courts, to decide the conditions of imprisonment.
Last June, the US Supreme Court ruled inmates did have the right to challenge their detention.
It led to a flurry of lawsuits on behalf more than 60 of the 550 or so detainees at the US Navy base at Guantanamo Bay.
Another federal judge is expected to rule soon on a separate lawsuit brought by the other detainees.
District Judge Leon upheld the view of Bush administration lawyers that foreign nationals captured and detained outside the US had no recognisable constitutional rights.
"The petitioners are asking this court to do something no federal court has done before: evaluate the legality of the (president's) capture and detention of non-resident aliens, outside the United States, during armed conflict," he wrote in his 34-page opinion.
Lawyers for the detainees said they would appeal, the Associated Press reported.
"I didn't think it was going to be quite as sweeping as this nor quite as dismissive of the Supreme Court's decisions," said Barbara Olshansky, lawyer with the New York-based Center for Constitutional Rights.
Meanwhile, Cuba's foreign ministry says it has protested to the US government about alleged abuses against inmates at the base, on Cuba's south-eastern tip.
It accused Washington of lying, "by hiding the horrendous torture, cruelty and humiliating and insulting treatment of prisoners".
The US State Department dismissed the charges, and said it was ironic that such criticisms came from "the biggest, and most closed, human rights violator in the hemisphere".