Tony Blair meets Muammar Gaddafi
Tony Blair meets Muammar Gaddafi in a tent in Sirte in May 2007, announcing the beginning of 'a new relationship'

Tony Blair has strongly refuted allegations that he did a deal with Muammar Gaddafi to release the Lockerbie bomber from prison in exchange for Libya signing a £400m air defence deal with a British manufacturer.

Secret documents released in response to a Freedom of Information Act request reveal that Britain's then-ambassador in Tripoli, Sir Vincent Fean, sent an email to Blair declaring the prisoner transfer agreement would be signed as soon as Libya went through with the arms deal.

Abdelbaset al-Megrahi was released in August 2009. At the time, prime minister Gordon Brown insisted that his release was not linked to any deal, dismissing suspicions of a "blood money" agreement. Ministers insisted the decision was taken solely by the Scottish government.

Megrahi was convicted of the murder of 270 people by blowing up an American passenger jet over Lockerbie in December 1988.

According to the Daily Mail, Fean sent his email to Blair ahead of the his visit to Libya in June 2008. Blair had stepped aside as prime minister the previous year.

As premier, Blair had previously met Gaddafi along with his prime minister Al-Baghdadi Ali al-Mahmoudi in a desert tent in the Libyan leader's hometown of Sirte in 2007. The two leaders signed a memorandum of understanding on prisoner transfers at around the time BP said it would invest £545m in oil exploration in Libya.

In his email, Fean alluded to a deal between Blair and Gaddafi according to which Libya would buy the Jernas missile defence system from the manufacturer MBDA, which was part-owned by BAE Systems.

Blair legacy issue

Fean wrote: "There is one bilateral issue which I hope TB [Tony Blair] can raise as a legacy issue. On 29 May 07 in Sirte, he and Libya's PM agreed that Libya would buy an air defence system (Jernas) from the UK (MBDA).

"One year on, MBDA are now back in Tripoli aiming to agree and sign the contract now - worth £400m, and up to 2,000 jobs in the UK.

"We think we have Col Q's [Gaddafi's] goodwill for this contract. This issue can also be raised with Libya's PM. It was PM Baghdadi who told the media on 29 May 07 that Libya would buy British.

"Linked (by Libya) is the issue of the four bilateral justice agreements about which TB signed an MoU with Baghdadi on 29 May. The MoU says they will be negotiated within the year: they have been.

"They are all ready for signature in London as soon as Libya fulfils its promise on Jernas."

The prisoner transfer agreement was signed in November 2008.

A spokesman for Blair denied that the email showed the UK government "was trying to link the defence deal and Megrahi".

The spokesman said: "Actually it shows the opposite - that any linkage was from the Libyan side. As far as we're aware there was no linkage on the UK side.

"What the email shows is that, consistent with what we have always said, it was made clear to the then Libyan leader that the release of Megrahi was a matter for Scotland. Of course the Libyans, as they always did, raised Megrahi."

MBDA said the Libyans never signed the £400m arms deal.