Foreign terror suspects being held in Guantánamo Bay can challenge their confinement through the US courts, a federal judge ruled today.

US district judge Joyce Hens Green also criticised the Bush administration for holding hundreds of people without legal rights.

Ruling on claims filed by more than 50 detainees, she said the supreme court had last year made it clear they have constitutional rights that lower courts should enforce.

The "war on terror", Judge Green wrote in a 75-page declassified opinion released to the public, "cannot negate the existence of the most basic fundamental rights for which the people of this country have fought and died for well over 200 years."

The opinion added: "The court concludes that the petitioners have stated valid claims under the fifth amendment to the United States constitution and that the procedures implemented by the government to confirm that the petitioners are 'enemy combatants' subject to indefinite detention violate the petitioners' rights to due process of law."

Lawyers for the government had argued the prisoners have no constitutional rights and that their claims, challenging the conditions of their confinement and seeking their release, must therefore be dismissed.

Today's decision conflicts with a ruling made by another federal judge, based in Washington, which was handed down on January 19.

US district judge Richard Leon found last year's landmark supreme court ruling did not give Guantánamo detainees the legal basis to win their freedom. He ruled that they had no recognisable constitutional rights and were subject to the military review process.

The process, which would have seen military tribunals take place at Guantánamo, was authorised by George Bush, but criticised by human rights groups as being fundamentally unfair.

The tribunals were suspended in November when another Washington court ruled them unconstitutional. Only four of the approximately 550 detainees held at Guantánamo, in Cuba, had been charged.