Image copyright AFP Image caption UK resident Binyam Mohamed had sought compensation following his release

Around a dozen men who accused British security forces of colluding in their transfer overseas are to get millions in compensation from the UK government.

Some of the men, who are all British citizens or residents, were detained at the Guantanamo Bay prison camp in Cuba.

At least six of them alleged UK forces were complicit in their torture before they arrived at Guantanamo.

Foreign Secretary William Hague denied the deal was an admission that security agencies colluded in any mistreatment.

In response to questions, he said the settlement reflected the desire to "move on" and be able to conduct an inquiry.

Justice Secretary Kenneth Clarke told the Commons that the settlement was "significant", but had the cases gone to court, it would have cost taxpayers up to £50m.

The coalition government made clear in the summer that it wanted to avoid a massive court case which would also have put the British secret intelligence services under the spotlight. Prime Minister David Cameron offered to enter settlement talks with six men seeking damages, an offer that has now been accepted.

Bisher al-Rawi, Jamil el Banna, Richard Belmar, Omar Deghayes, Binyam Mohamed and Martin Mubanga had led a High Court case against five government departments including MI5 and MI6.

They had claimed that officials in London were complicit in their transfer to Guantanamo Bay and should have prevented it and their ill-treatment.

In May, the Court of Appeal ruled that the government could not rely on secret evidence to defend itself against the six cases, saying allegations of wrongdoing had to be heard in public.

Analysis The government has resisted this legal claim tooth and nail. The court hearings became an exhausting battle of legal wits, as massed benches of government lawyers refused to give ground. So why settle, given critics will inevitably accuse ministers of a cover-up? The decision should come as no surprise. The Court of Appeal rejected ministers' pleas to hear secret evidence in closed courts and the drip-drip of secret material from MI5 and MI6 vaults could have become a flood. Settling the case therefore achieves the government's greater aim. It triggers the launch of a judge-led inquiry into complicity and rendition. That inquiry will now go about its business but the main accusers won't be appearing in public demanding the exposure of a secret paper trail from Afghanistan to government offices in London. Paying out millions looks bad, but ministers know that exposing state secrets is worse still.

Since then, more than 60 government lawyers and officials have been sifting through some 500,000 documents at a secret location. The case was estimated to cost millions and could have lasted for at least another three years.

The BBC understands that both the Intelligence and Security Committee and the National Audit Office will be briefed in detail about the nature of the payments. But the settlement also paves the way for the government to launch an inquiry headed by former judge Sir Peter Gibson into the claims made against the intelligence and security agencies.

Mr Hague said it would up to the inquiry to determine whether the case had been damaging for MI5 or MI6, but said it was good for Britain's intelligence agencies to be able to "look entirely to the future, and not spend years going through court cases".

Binyam Mohamed's solicitor, Sapna Malik, said: "I can't confirm any details about the settlement package. All I can say is that the claims have been settled and the terms are confidential.

"Our client was horrendously treated over a period of almost seven years, with a significant degree of collusion from the security services in the UK."

The UK security services have always denied any claims that they have used or condoned the use of torture.

Last month, the head of MI6, Sir John Sawers, described torture as "illegal and abhorrent" and defended the service's need for secrecy.

Shami Chakrabarti, director of Liberty, said of the payments: "It's not very palatable but there is a price to be paid for lawlessness and torture in freedom's name. There are torture victims who were entitled to expect protection from their country.

Media playback is unsupported on your device Media caption Binyam Mohamed's solicitor, Sapna Malik said her client deserved compensation for what he had endured

"The government now accepts that torture is never justified and we were all let down - let's learn all the lessons and move on."

Mr Mohamed, from west London, was held in Pakistan in 2002 before US agencies moved him to Morocco, where he was tortured, before he was sent on to Guantanamo Bay in Cuba, via Afghanistan.

During court hearings, it emerged that a British intelligence officer visited him in detention in Pakistan and that his interrogators in Morroco asked him questions supplied by MI5. Around a dozen men who accused British security forces of colluding in their rendition overseas are to get millions in compensation from the UK government.

BBC News website readers have been reacting to the news:

The case in the UK will have little effect on the processes relating to the Guantanamo prison facilities. The Obama administration has made decisions based on domestic criteria. Furthermore the US displays concerns relating to the viability of British Intelligence, security and military assets following failures in Iraq and Afghanistan and pending the defence cutbacks. The most that can be said is that US media will report this which will put pressure on the remaining democrats in marginal seats. Marc, London

Sure, let's move forward but what about the torture undergone by the troops serving in places like Iraq or Afghanistan? Where are the millions for that? Roger, Lichfield

With respect to Guantanamo it is a meaningless move on the part of the UK government. George Bush wanted to close it down and failed, Barack Obama also pledged to shut it down and has failed so far. Why? While some innocent people may have been swept up into it, the vast majority are dangerous men who can neither be set free, nor returned to their home countries where they are liable to experience real torture and death. Niall Firinne, London

Guantanamo should never have existed. What is more the UK government should never have been complicit in its existence and should have said so clearly and unequivocally. It should also have demanded that any British citizens "entrapped" in activities which might have led to their being incarcerated in this abomination should have been handed immediately to the UK authorities to undergo the due process of UK law. We must never be a poodle to the US in such matters again. Whether this will lead to Guantanamo closing is a matter for US law. As much of US law is based on UK law it might suggest that the US is in for a mighty big compensation claim! Keith Foord, Battle

How can a government which has no money give it away so easily? We have to put the security of UK citizens first, even if it means sometimes arresting and interrogating some suspects. There is a price to pay for the justice process to work. We are so soft in the head, it is laughable. This is giving in even more to the culture of compensation. Nabil Zakher, Bexhill

Why are these people being allowed to claim against the people of Great Britain when their alleged crimes were committed in other countries, and their arrest and detention happened in other countries? When the alleged torture and abuse happened in other counties? When the supposed collusion in their alleged torture by our security forces is not proven? When their link to this country is in many cases tenuous at best? Michael, Lincoln