Al-Megrahi, the only man convicted over the 1988 bombing of Pan Am flight 103,  is suffering from terminal cancer and was released from prison and returned to Libya last month.

Growing ties

The letters also show that British officials repeatedly stressed the importance of growing UK-Libyan interests in pushing for al-Megrahi's release.

The revelations are likely to increase pressure on Brown, whose government has insisted that the decision to allow the release was taken solely on compassionate grounds and by the semi-autonomous Scottish government.

In depth

 Profile: Abdel Basset al-Megrahi
 Bomber's homecoming slammed
 Release prompts anger and relief
  Video: Al-Megrahi speaks out
  Video: Opinions divided over Lockerbie appeal
 Video: Lockerbie remembered
 Al-Megrahi statement in full

But David Miliband, Britain's foreign secretary, said on Wednesday that while the UK did not want al-Megrahi to die in jail, there was no deal with Libya over his release.

"The allegation that is being made ... is that somehow we pressured the Scottish government into making a decision one way or another," he said, adding: "There was no pressure from the British government on the Scots."

The British government released the documents in an attempt to quell speculation that it pushed for al-Megrahi's release based on moves to increase economic cooperation with Libya.

Britain has regional governments in Scotland, Wales and Northern Ireland that are responsible for local issues but retains power over foreign policy.

According to the papers, Jack Straw, Britain's justice secretary, underscored the importance of a "strong relationship" with Libya.

"You ask what I mean by 'national interests," he said in a letter last year to Alex Salmond, the Scottish first minister.

"Developing a strong relationship with Libya, and helping it to reintegrate into the international community, is good for the UK. Libya is one of only two countries to have ever voluntarily and transparently dismantled its weapons of mass destruction programme.

"Having sponsored terrorist attacks in the past, it is now be an important partner in the fight against terrorism."

Change of mind

Straw had originally written to Scottish authorities a year before saying there might be a way to exclude al-Megrahi from a potential prisoner-transfer agreement - an exclusion that could have appeased the US and eliminated a way that al-Megrahi could have been freed.

It was unclear what prompted Straw to change his mind.

"I do not believe that it is necessary, or sensible, to risk damaging our wide ranging and beneficial relationship with Libya by inserting a specific exclusion into the PTA [prisoner transfer agreement]," Straw wrote in the letter to Salmond in 2008.

Brown is said to have argued against keeping al-Megrahi in jail [EPA]
The release of the documents is likely to fan resentment in the US, where al-Megrahi's release, after serving eight years of a life sentence, has been vehemently condemned.

Many of the 270 people killed in the bombing were US citizens.

Commenting on the latest revelations, Richard Kolko, a spokesman for the US justice department, said that his department had "received assurances in the 1990's that al-Megrahi's full sentence would be served in Scotland".

The statement seemed to contradict other documents, including one from Britain's foreign office that said there was no commitment given to the US to keep al-Megrahi imprisoned.

The exchanges also raise questions on whether Britain warned Scotland of a possible diplomatic fallout with the US should al-Megrahi be released.

'Heinous crime'

In another disclosed exchange, Abdulati Alobidi, Libya's minister for Europe, said that Bill Rammell, the junior UK foreign office minister, visited Tripoli in February and told him that Britain did not want al-Megrahi to die in prison.

This is another statement that contradicts US claims that Britain assured them that al-Megrahi would stay in Scotland.

Al-Megrahi wrote a letter to Scottish authorities declaring his innocence [AFP]

Straw has denied that the negotiations referred to in his letters, which were leaked to a local newspaper, involved any commercial deals with Libya.

Other documents published by the Scottish government included a handwritten note from al-Megrahi to Kenny MacAskill, the Scottish justice secretary, in which he said: "I am unjustly convicted of a most heinous crime".

Britain and the US condemned the joyous scenes that greeted al-Megrahi'sreturn to Tripoli last month.

The reception was given despite an appeal from Brown in a letter to Muammar Gaddafi, the Libyan president, to keep the occasion low-key.

The release of the letters also come as Gaddafi marked the 40th anniversary on Tuesday of the bloodless coup that brought him to power.