Image caption Padilla (in orange prison suit) is serving a 17-year sentence in Colorado

A US judge has quashed a lawsuit by an American who said he was illegally detained and repeatedly tortured for three years in a US navy jail.

Jose Padilla was seeking to sue current US Defence Secretary Robert Gates and his predecessor, Donald Rumsfeld, for violating the constitution.

He was jailed in 2007 for terrorism-related offences.

Judge Richard Gergel ruled that US laws did not offer clear guidelines on the detention of enemy combatants.

Any trial, he wrote, would be "an international spectacle with Padilla, a convicted terrorist, summoning America's present and former leaders to a federal courthouse to answer his charges".

Defence Secretary Gates also served under President George W Bush, replacing Mr Rumsfeld in December 2006.

'Beneath the law'

Padilla is serving a 17-year sentence at a maximum-security prison in the state of Colorado.

The court today held that Donald Rumsfeld is above the law and Jose Padilla is beneath it Ben Wizner, American Civil Liberties Union

He was taken into custody in Chicago in May 2002 after arriving at O'Hare International Airport from Pakistan via Switzerland.

President Bush declared him an enemy combatant a month later, saying he possessed valuable intelligence about the personnel and activities of al-Qaeda.

Taken to a navy jail in South Carolina, he was held there for more than three years.

His defence alleged that he was tortured by being kept in darkness and isolation, deprived of sleep and religious materials, and kept from family and lawyers.

Legal critics say his case highlighted the Bush administration's aggressive moves to hold terrorism suspects for years without formal charges.

Ben Wizner, the litigation director at the American Civil Liberties Union, called Thursday's ruling "troubling".

"The court today held that Donald Rumsfeld is above the law and Jose Padilla is beneath it," he said in a statement.

"But if the law does not protect Jose Padilla, it protects none of us, and the executive branch can simply label citizens enemies of the state and strip them of all rights, including the absolute right not to be tortured."