London: Former British Prime Minister Tony Blair made two secret visits to Libya and met Colonel Muammar Gaddafi just before Lockerbie bomber's release from a Scottish prison, letters and emails uncovered in Tripoli reveal.

After stepping down as British PM, Blair was twice flown to Libya on a Gaddafi private jet -- he visited the dictator in June 2008 and April 2009, when Libya was threatening to cut all business ties with Britain if Abdelbaset al-Megrahi stayed in a Scottish jail, a daily reported.

The emails and letters, in which the Colonel is referred to as "The Leader", show that in 2008 and 2009, Blair had negotiated to fly to the Libyan capital from Sierra Leone, where he was promoting tourism, in a jet provided by Gaddafi.

One letter was written on June 2, 2008, by Gavin Mackay, from Blair's office, to Libya's ambassador to the UK.

It said: "Let me begin my (sic) saying that Mr Blair is delighted that The Leader is likely to be able to see him during the afternoon of June 10, and he is most grateful that the Libyan authorities have kindly offered an aircraft to take him from Freetown to Tripoli and back to London."

Another letter shows that Blair took billionaire Tim Collins to the April 2009 meeting as the Libyans wanted to discuss a beach resort deal.

Blair's events organiser Victoria Gould wrote to the British ambassador in Tripoli, Sir Vincent Fean, to ask whether the former PM could stay at his residence.

She wrote: "If we were able to stay at the Residence, I know TB (Mr Blair) would be really grateful (as would we all)." Sir Vincent wrote back: "Just to confirm that the residence is at your disposal."

A week later, Gould wrote in an email: "We have asked the Libyans to collect us from Sierra Leone and bring us to Libya. In terms of calls, if you could note that TB would like to do the following: a meeting with The Leader."

The meeting came a day after Britain signed an agreement with Libya which paved the way for Megrahi's release. This happened in August 2009 after doctors gave him three months to live because of cancer. He is still alive.

A spokesman for Blair said: "The subjects of the conversations during Mr Blair's occasional visits was primarily Africa, as Libya was for a time head of the African Union; but also the Middle East and how Libya should reform and open up.

"Of course the Libyans, as they always did, raised Megrahi. Mr Blair explained, as he always did, that it was not a decision for the UK Government but for the Scottish Executive."

(Agencies)