An email has emerged suggesting a connection between the prisoner transfer deal negotiated between Libya and the last Labour government, that could have allowed the release of the Lockerbie bomber Abdelbaset al-Megrahi, and a £400m arms deal.

The document, which shows that Sir Vincent Fean, the then British ambassador to Libya, wrote to Tony Blair in June 2008 saying that the prisoner transfer agreement was "ready for signature in London" as soon as Libya went ahead with the purchase of an air defence system, was obtained by the Sunday Telegraph.

Blair was no longer prime minister at the time, but Fean mentioned the two issues in a 1,300-word briefing for Blair before a visit to Tripoli where he was meeting Muammar Gaddafi, the Libyan dictator.

The prisoner transfer agreement was eventually signed in November 2008. Although the UK government originally wanted to exclude Megrahi from its provisions, the final version included him and could potentially have been used to authorise his return to Libya. However, in August 2009 the Scottish government refused to send Megrahi to Libya under the prisoner transfer agreement but instead allowed his release on compassionate grounds because he was suffering from terminal cancer. The arms deal was never concluded.

The release of Megrahi, who eventually died in May 2012, provoked outrage in the US and elsewhere. At the time ministers rejected claims that the decision to allow him to return home was influenced by commercial concerns, but the new email, obtained using the Freedom of Information Act, suggests the Foreign Office was trying to link the two issues.

Before he resigned as prime minister, Blair met Gaddafi in Libya in May 2007. At that meeting the Libyans agreed they would buy a £400m missile defence system from MBDA, a weapons manufacturer part-owned by BAE Systems.

The following year, in his email to Blair, Fean said that he hoped that the former prime minister would raise this with Gaddafi in his meeting, which was primarily about matters relating to Africa. 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 the air defence system (Jernas) from the UK (MBDA). One year on, MBDA are now back in Tripoli (since 8 June) aiming to agree and sign the contract now – worth £400m, and up to 2,000 jobs in the UK.

"Linked (by Libya) is the issue of the four bilateral justice agreements about which TB signed an MoU [memorandum of understanding] with [Al-Baghdadi Ali al-Mahmoudi, the Libyan prime minister at the time] 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."

A spokesman for Blair said that it was the Libyans who were trying to link the prisoner transfer agreement to the arms deal and that the email confirmed this. The spokesman also said it was made clear to Gaddafi that any decision about the release of Megrahi was a matter for the Scottish government, not the UK government.

The Foreign Office said it was not appropriate to comment on the papers of a previous administration and pointed to the review published by Sir Gus O'Donnell, the then cabinet secretary, in February 2011 covering matters relating to the release of Megrahi. That concluded that the UK government did all it could to facilitate the release of Megrahi, whilst at the same time avoiding overtly pressurising the Scottish government, which had the final say.

• This article was amended on 29 July 2013. It originally stated that the prisoner transfer agreement paved the way for the release of the Lockerbie bomber. In fact, although Abdelbaset al-Megrahi was covered by the agreement, the Scottish government refused an application to return him to Libya under its terms. Instead he was released on compassionate grounds. This has been corrected.