Compensation payments and legal costs for 16 British citizens and residents who claim they were tortured at Guantanamo Bay could leave the Government footing a bill of up to £30m.
The decision to settle the costly case also raises concerns about Britain's true role in the torture of prisoners during the "war on terror".
The case ends an already damaging court battle between MI5 and lawyers representing Binyam Mohamed, who alleges that Britain knew he was being tortured at the hands of the Americans.
The Tory MP Andrew Tyrie, chairman of the all-party group on extraordinary rendition, called on the Prime Minister to ensure that all evidence of any alleged torture or complicity would be given to a public inquiry into the allegations, chaired by Sir Peter Gibson, a retired judge.
Shami Chakrabarti, director of Liberty, said: "This settlement could bring a broader inquiry and the end of the torture scandal a little bit closer. But if the slow, morale-sapping bleed of revelation and litigation is to end, the Gibson process must have all the power and authority of a court. It must distinguish between national security and embarrassment; between clean-up and cover-up."
Kenneth Clarke, the Justice Secretary, said that the payments were essential to prevent court action against the security services getting "bogged down" for many years. He told MPs: "The alternative to any payments made would have been protracted and extremely expensive litigation in an uncertain legal environment in which the Government could not be certain that it would be able to defend departments and the security and intelligence agencies without compromising national security.
"This cost was estimated at approximately £30m to £50m over three to five years and in our view there could have been no inquiry until that litigation had been resolved."
Mr Clarke said of the litigation: "It wasn't going to do anybody any good – hence we paid up the money."
Nevertheless MPs of all parties expressed concerns over the payments. Patrick Mercer, a Tory MP and security expert, said Islamist websites had seized on the payments to claim that Britain had admitted its involvement in torture. "While not saying that, we're prepared to pay very large sums of money – we don't know how much yet. That is tantamount to an admission of guilt. It is very difficult for us to be able to handle this, but nonetheless this has inevitably given some comfort to our enemies."
David Winnick, Labour MP for Walsall North, said: "I find it, as many people will find it, difficult to understand how compensation was paid unless there was substance to the allegations made by those who claimed they were detained illegally and transferred."
Sadiq Khan, the shadow Justice Secretary, argued that there was a public interest in knowing the total sums involved in this settlement. Mr Clarke replied: "I'm afraid I am not able to tell you the precise sums of money involved but I think the gain that has been achieved by managing to mediate these claims is very considerable and is in the national interest."
Sir Peter's inquiry will begin once police investigations into the torture claims are complete. It is due to last no more than a year.
Downing Street acknowledged that some people would find the payments "unpalatable" yesterday, but insisted that the Government needed to "draw a line under the past" and let the intelligence services focus on their main duties. Mr Cameron's official spokesman stressed that the payments should not be regarded as compensation to the former detainees as the Government was not admitting any culpability over their treatment.
He added: "In the past few years nearly 100 employees of the security services have been devoted to dealing with these cases. We were in a situation where we were facing years of litigation, the cost of which would have been tens of millions of pounds."
Yesterday a senior sitting judge, Lord Justice Gross, warned the Government that "encounters between the agencies and the courts are likely to continue".
Speaking at the Royal United Services Institute, Lord Justice Gross said: "It is incumbent on the courts to proceed with caution when intervening in this area, so as to guard against (however unintentionally) the impact of the law on the agencies producing an unduly risk (or litigation) averse cast of mind – to the detriment of all those concerned."
Highlighting the benefits of "mutual understanding" between the courts and the security services, he went on: "Neither a magic wand nor an instant solution is available.
"When weighing competing legal solutions to national security issues and seeking to do practical justice, if at all possible, the reality of the demands on the agencies' resources should be taken into account.
"To be effective, and even to begin to match up to the public expectations of what secret intelligence can deliver by way of public security, the work of the intelligence community must remain shrouded in secrecy, particularly regarding its sources and methods."
The leading defendants
Born in Britain, the father of four, aged 41, lived in Birmingham where he was a law student before moving to Kabul to build a school. After 9/11 the family was arrested by the CIA in Pakistan and accused of being part of al-Qa'ida. Claims he was wrongly held at Guantanamo for three years.
The 34-year-old has joint Zambian and British nationality because his family moved to the UK in the 1970s. He was raised as a Catholic before converting to Islam in his twenties. Arrested in Zambia in 2001 after spending time in Afghanistan and Pakistan, he is suing the Government for colluding in his unlawful extraordinary rendition.
The Ethiopian, 32, arrived in the UK in 1994 seeking asylum. His application was rejected but he was granted leave to remain for four years. He lived in west London working as a cleaner.
In 2001 he travelled to Pakistan and Afghanistan after converting to Islam. He was arrested at Karachi airport in 2002 as he tried to leave Pakistan and was accused by the US of being a member of the Taliban.
He claims he was flown around the world on rendition flights and tortured. He says that when he was interrogated in Morocco he was asked questions supplied by British Secret Services.
An Iraqi national and British resident, Mr al-Rawi, 49, was reportedly sent to England in 1985 after his father was arrested by Saddam Hussein's secret police. He was held at Guantánamo on suspicion of links to terrorism while on a trip to Gambia in 2002 alongside Jamil el Banna. He claims he was wrongly held and that he was tortured during his detention.
Jamil el Banna
A 58-year-old Jordanian who lived in north-west London, Mr Banna was arrested in Gambia in November 2002 alongside his best friend, Bisher al-Rawi.
He was alleged to have been associated with al-Qa'ida through the radical Muslim cleric Abu Qatada. Claims he was unfairly detained until December 2007.
A British citizen, Mr Belmar, 31, converted to Islam in his teens and travelled to Pakistan before the 11 September attacks. Reportedly a former Royal Mail worker, he was first detained in Pakistan and then sent to Bagram and Guantánamo. He claims he was unfairly detained after returning to Britain without charge in January 2005
Mr Deghayes, 40, was born in Libya. In 1986 his family moved to the UK. In 2000, he travelled to Afghanistan where he married and had a son. He settled in Lahore in 2001 and was arrested in Pakistan in 2002. He claims he was unfairly detained until his release from Guantánamo in 2007.
Does this mean Britain has admitted to torture?
Q: Does the settlement mean the Government has admitted to torture?
A: No. Ministers have agreed to pay a substantial sum in order to end the court case without admitting liability.
Q: But there's no smoke without fire?
A: There has been plenty of evidence from the detainees that they were unlawfully imprisoned and tortured by the Americans. MI5 and MI6 have always denied they knew about any of these practices.
Q: If our secret services were so confident that they had nothing to hide, why didn't they fight the case to the end?
A: As the case has progressed through the courts, further damaging material about British secret operations has come into the public domain. By ending the litigation the Government can protect the secret services from further harm.
Q: What would have happened if the litigation was allowed to run its course?
A: The case of the former detainee Binyam Mohamed has demonstrated that there was a close working relationship between the American and British security agencies in the "war on terror". Some of the judges hearing the case have already taken a very dim view of the MI5 evidence given in court. Having lost the trust of the judiciary, MI5 and MI6 may have thought that there was no advantage in continuing.
Q: How much compensation will the former detainees receive?
A: In total it will probably run into many millions of pounds.
Q: Who pays for the settlement?
A: The taxpayer.
Q: Is that the end of the story?
A: Not quite. Peter Gibson, another judge, will chair a public inquiry into rendition and torture where many of the same issues will be aired.
Q: Will this achieve the same result as the court case?
A: There is real concern that the court's powers to order the disclosure of sensitive documents surrounding complicity in torture would have revealed more about complicity in torture than Sir Peter's inquiry.