Three Britons and a Canadian have been denied the right to sue Saudi Arabian officials they say tortured them.
Mr Sampson and Mr Walker say they were forced to confess
A Law Lords ruling allowed an appeal by the Kingdom of Saudi Arabia against a 2004 Court of Appeal decision for the men to be able to sue for damages.
The four had been jailed after being accused of taking part in a bombing campaign in Saudi Arabia six years ago.
Saudi Arabia, supported by the British government, argues that its officials are protected by state immunity.
It says state immunity extends to individuals and has to be protected.
The four men were backed by Amnesty International, The Redress Trust, Interights and Justice.
The Court of Appeal's 2004 ruling to let Sandy Mitchell, Les Walker, Ron Jones and Canadian Bill Sampson sue was described by civil rights lawyers as an historic victory, ending immunity for torturers abroad.
But Saudi Arabia appealed to the Law Lords, arguing that its officials were protected by the 1978 State Immunity Act.
Lawyers for the men involved had said that argument is incompatible with international and European human rights law.
But the British government intervened in the case to support the State Immunity Act.
After the five Law Lords' ruling, a Department for Constitutional Affairs spokesman said the government "condemns torture in all its forms and works to eradicate it wherever it occurs".
"The intervention in this case is not about criminal responsibility for torture, nor about the UK government's attitude to torture.
"It concerns jurisdiction, and the way in which civil damages can be sought against a foreign state for acts allegedly committed in its own territory."
But Medical Foundation for the Care of Victims of Torture chief executive Simon Carruth accused the government of "ignoring the suffering of its own citizens to back the servants of a state that routinely uses torture".
"The British government has sacrificed the moral rights of its citizens and missed an opportunity to bring pressure to bear on a state guilty of human rights abuses," he added.
The UN Convention Against Torture "clearly imposes on states a duty to prevent and punish acts of torture, wherever they occur," he said.
"Saudi Arabia is party to the convention, which it conspicuously fails to uphold."
Mr Mitchell, from Kirkintilloch, near Glasgow, Mr Walker, of Neston, Wirral, and Mr Sampson, who lives in Penrith, Cumbria, say they were tortured and forced to confess to bombings in Saudi Arabia. They spent two-and-a-half years in prison after being convicted of a series of bombings in the country before being released in August 2003.
Mr Jones, from Hamilton, in Lanarkshire, was injured in a bomb blast in Riyadh in 2002.
He says he was taken from his hospital bed, imprisoned and then tortured until he confessed to the bombing.
His treatment by captors, which included being beaten on his hands and feet, being suspended by his arms, deprived of sleep and forcibly fed mind-altering drugs, has been independently confirmed.
He was held for 67 days before being released.
All the men were released after an al-Qaeda attack in May 2003 by nine suicide bombers in Riyadh which disproved official Saudi claims that the attacks were the result of an alcohol turf war among Westerners.
Outside court, he said he was disappointed. "We have come to the highest court in the land and we have not received justice," he said.
"The case has been looked at from the point of view of the law and not of justice.
"It is now time for the British government - which intervened to back the law of state immunity - to intervene on our behalf in order to get us some justice."
Les Walker added: "It's all down to money and oil and planes. Don't upset the Saudis. That's the British government's view."
The men's lawyer, Tamsin Allen, said: "These men and others suffered horrific acts of torture in a Saudi jail which have left them with permanent and debilitating physical and psychiatric injuries.
"As a result of today's decision no court will hear their claim for compensation, no-one will be held to account and the men will receive no compensation.
"The same applies to all other UK victims of torture abroad who hope the House of Lords would open the way to redress."
She said the fight would not end with the Lords' decision.
"The men now expect the UK to fulfil its obligations under the torture convention by ensuring that the torturers are investigated and prosecuted," she said.
"They will also lodge and application in the European Court of Human Rights on the basis that there has been an unjustified interference with our clients right to a fair hearing.
"We hope and expect the European Court to agree."