Tony Blair wrote to Colonel Muammar Gaddafi to thank him for the “excellent cooperation” between the two countries’ counter-terrorism agencies following a period during which the UK and Libya worked together to arrange for Libyan dissidents to be kidnapped and flown to Tripoli, along with their families.

The letter, written in 2007, followed a period in which the dictator’s intelligence officers were permitted to operate in the UK, approaching and intimidating Libyan refugees in an attempt to persuade them to work as informants for both countries’ agencies.

Addressed “Dear Mu’ammar” and signed “Best wishes yours ever, Tony”, the letter was among hundreds of pages of documents recovered from Libyan government offices following the 2011 revolution and pieced together by a team of London lawyers.

Cooperation between British spies and Gaddafi’s Libya revealed in official papers Read more

The lawyers are bringing damages claims on behalf of a dozen Gaddafi opponents who were targeted by the two countries’ agencies during the covert cooperation. The claimants were variously detained and allegedly mistreated in Saudi Arabia, rendered from Mali to Libya, or detained and subjected to control orders in the UK.

Six Libyan men, the widow of a seventh, and five British citizens of Libyan and Somali origin are bringing claims against the British government on the basis of the recovered documents, alleging false imprisonment, blackmail, misfeasance in public office and conspiracy to assault.

The letter has emerged at a time when the last Labour government’s foreign policy record is coming under intense scrutiny. This week Blair rejected suggestions he was to blame for the delayed publication of the report of the Chilcot inquiry into the UK’s decision to join the war in Iraq. Blair is among those expected to be criticised in the report.

Libya, meanwhile, has descended into further violence and economic chaos since the revolution, with rival militias shelling residential areas, destroying airports and burning down oil refineries in their struggle for wealth and influence.

The recovered documents show that MI5 and MI6 submitted more than 1,600 questions to be put to two opposition leaders after they had been kidnapped with British assistance and flown to one of Gaddafi’s prisons. Both men say they suffered appalling torture.

Tony Blair’s letter to Muammar Gaddafi in April 2007.

The information that flowed back to London as a result of the interrogations was allegedly used to justify control orders imposed on four Libyan dissidents resident in Britain. The information is also alleged to have been deployed as evidence during partially secret court proceedings, during which government lawyers attempted to secure the deportation of several Libyan men. Government lawyers have denied they relied upon information from prisoners in Libya.

Blair’s letter from Downing Street was written on 26 April 2007, to inform Gaddafi that the UK was about to fail in its attempts to deport two Libyans allegedly linked to an Islamist opposition organisation, the Libyan Islamic Fighting Group (LIFG). The following day the court of appeal handed down a judgment in which it said LIFG associates could not be deported to Libya as they could be tortured, regardless of any assurances offered by Gaddafi. Lawyers representing the two men did not know at that time that the intelligence assessments of their clients were based in part on information extracted from victims of the UK-Libyan rendition operations.

Blair began his letter to Gaddafi with the line: “I trust that you, and your family, are well.” He then informed the dictator that he believed it to be essential that the court’s decision “is not allowed to undermine the effective bilateral cooperation which has developed between the United Kingdom and Libya in recent years … not least in the crucial area of counter-terrorism.”

He added: “I would like to add a personal word of thanks for your assistance in the matter of deportation. That support – and the excellent cooperation of your officials with their British colleagues – is a tribute to the strength of the bilateral relationship which has grown up between the United Kingdom and Libya. As you know, I am determined to see that partnership develop still further.”

The same day, Blair’s chief foreign policy adviser, Sir Nigel Sheinwald, wrote to a Libyan foreign minister, Abdul Ati al-Obeidi, warning him that there had been references in court “to public statements made by the leader of the revolution”, and that this had led to some debate about Gaddafi during the proceedings. Al-Obeidi replied that the decision was deeply disappointing, as Libya had done everything expected of it, including providing answers to all of the questions that had been supplied by the British.

The Guardian put a number of questions to Blair, asking whether he had authorised MI6 involvement in the rendition of the two Libyan opposition figures and their families; why Gaddafi’s intelligence officers had been permitted to operate in the UK; and why he had thanked the dictator for his “assistance in the matter of deportation” when this assistance is now alleged to have included the provision of information extracted under torture.

Facebook Twitter Pinterest Abdel Hakim Belhaj is bringing a claim against the British government. Photograph: Francois Mori/AP

Blair’s office responded by issuing the same statement it gave last month following publication of the US Senate intelligence committee report on the CIA’s use of torture after 9/11, when the former prime minister was facing accusations that his government had been complicit in those human rights abuses.

The statement said: “For the avoidance of doubt, Tony Blair has always been opposed to the use of torture; has always said so publicly and privately; has never condoned its use and – as is shown by internal government documentation already made public – thinks it is totally unacceptable. He believes the fight against radical Islamism is a fight about values and acting contrary to those values – as in the use of torture – is therefore not just wrong but counterproductive.”

Blair’s letter was written following several years of rapprochement between the UK and Libya, a process that gathered pace after the al-Qaida attacks of 9/11.

The UK can point to a number of achievements that arose from the relationship, including Gaddafi’s decision in 2003 to abandon his attempts to develop weapons of mass destruction.

The relationship has also faced severe criticism, however, and not only from those Libyans who suffered under the Gaddafi dictatorship or the human rights groups who had been documenting the abuses perpetrated by his regime over four decades.

When delivering the 2011 Reith lecture, Eliza Manningham-Buller, who was head of MI5 during most of the period that the UK’s intelligence agencies were working closely with the Libyan dictatorship, defended the decision to open talks with Gaddafi because it helped to deter him from pursuing his WMD ambitions, but added: “There are questions to be answered about the various relationships that developed afterwards and whether the UK supped with a sufficiently long spoon.”

The documents were discovered in abandoned government offices in Tripoli following the revolution that toppled Gaddafi and led to his killing in October 2011. They include secret correspondence from MI6, an MI5 intelligence assessment marked “UK/Libya Eyes Only – Secret”, and official Libyan minutes of meetings between the two country’s intelligence agencies.

The papers show that the UK’s intelligence agencies engaged in a series of previously unknown joint operations with the Libyan dictatorship and that information extracted from rendition victims was deployed as evidence during partially secret proceedings in London.

Facebook Twitter Pinterest Blair and Gaddafi during a break in talks held in March 2004. Photograph: Stefan Rousseau/PA

Five men were subjected to control orders on the basis of intelligence assessments that are now alleged to have been based in part on information extracted during Libyan interrogation of the two opposition leaders, Sami al-Saadi and Abdel Hakim Belhaj, following the UK-Libyan rendition operations.

Lawyers who represented the men subjected to control orders say that both the high court and the Special Immigration Appeal Commission were kept in the dark about the UK’s role in the kidnap of the two men who were providing the information about their clients.

The documents show that in 2006 Libyan intelligence agents were invited to operate on British soil where they worked alongside MI5 and allegedly intimidated a number of opponents of Gaddafi who had been granted asylum in the UK. They also show that British intelligence officers provided information to their Libyan counterparts about a British man of Libyan origin who had lived in the UK since 1981 and had been granted British citizenship in 1994. In September 2003 the UK agencies handed over a file which described this man as “a known figure in the Libyan extremist community in Manchester [who] has previously led a small group of LIFG-affiliated individuals in a dispute at a local mosque over the imam’s moderate preaching”.This man’s address and home and mobile telephone numbers were included in the file. He says that Libyan government officials called him repeatedly, urging him to return to Libya where they said that members of his family faced arrest.

The recovered documents show that MI5 also handed its Libyan counterparts a number of questions about this man, to be put to the two rendition victims.

Eventually, he agreed to travel to Libya, where he was arrested and, he says, tortured. He alleges that he was beaten, suspended from the ceiling, assaulted with electric prods, threatened, subjected to loud music and forced to listen to the torture of others. He was charged with membership of the LIFG, and with providing assistance to the organisation in the UK, and held in prison until March 2010.

The case is being brought by the 12 Gaddafi opponents against MI5 and MI6 as well as the Home Office and Foreign Office. Government departments declined to comment while the litigation is ongoing.

On Thursday an attempt by government lawyers to have the case struck out without admitting liability failed when the high court ruled the allegations “are of real potential public concern” and should be heard and dealt with by the courts.

The government had argued at the high court in London that the five claimants who were subjected to control orders were properly considered to pose a threat to the UK’s national security, and that the LIFG was also a threat to the UK.

Lawyers representing MI5, MI6, the Home Office and Foreign Office are expected to appeal against the ruling.