David Cameron today accused the former Labour government of ignoring the feelings of the Lockerbie families after an official review found it had sought to "do all it could" to secure the release of the only man convicted of the bombing.
The Cabinet Secretary Sir Gus O'Donnell, who carried out the review of the paperwork, concluded the decision to release Abdelbaset al-Megrahi in August 2009 on compassionate grounds had been taken by ministers in the Scottish government alone.
However, he also found that British ministers had believed that Megrahi's release would be the "best outcome" as they feared that UK interests in Libya would be damaged if he was allowed to die in a Scottish jail.
Newly-declassified documents show that officials advised that they should "work actively but discreetly" for Megrahi's release and that promoting contacts between the Libyans and the Scottish executive should be "part of our game plan".
There were angry scenes in the Commons as Mr Cameron announced the outcome of Sir Gus's review, with cries of "shame" and "disgusting" from some Tory MPs.
While Sir Gus said he had found nothing in the paperwork which contradicted statements made at the time by ministers, Mr Cameron said it was also clear that they had not given a "full picture" of the government's position.
He described the decision to release Megrahi - who had been thought to be close to death - as "profoundly wrong" and said Labour ministers had "badly underestimated" the impact in both Britain and the United States, where most of the 270 victims came from.
"This man was convicted of the largest mass murder in British history. That should have been coursing through ministerial veins and brains when they read these memos," he said.
Sir Malcolm Rifkind, who was Scottish secretary when Pan Am Flight 103 was blown out of the sky on December 21 1988, said that Megrahi's release had been "one of the most shameful and foolish decisions of recent years".
"The previous government was up to its neck in this shoddy business," he said.
Scottish First Minister Alex Salmond said that while Labour in Scotland had been attacking the Scottish National Party administration for releasing Megrahi, ministers in London had been quietly working to achieve that end.
"It seems to me the greatest example of organised political hypocrisy that I've ever seen in my time in politics," he said.
Former prime minister Gordon Brown strongly defended his government's actions, saying that the review made clear that he had always treated Megrahi's release as a matter for Scottish ministers.
"When the issue came to me, I took the view - as the report confirms - that the British government should not pressure or attempt to use influence on this quasi-judicial decision of the Scottish minister," he said in a statement.
He was backed by former justice secretary Jack Straw who told the Commons: "We acted properly at all times. At no stage did we ever suggest to the Scottish government what decision they should take."
Mr Cameron ordered Sir Gus to carry out a review of the documents following his visit last year to the United States, amid claims that BP had lobbied for Megrahi's release.
There had been intense anger at the oil giant over the Deepwater disaster in the Gulf of Mexico and the allegations revived simmering discontent over the way the Megrahi case had been handled.
In his report, Sir Gus said that he had found no evidence that BP had tried to put pressure on the Scottish government.
He also said he had not seen any evidence the UK ministers lobbied or pressurised their Scottish counterparts to release Megrahi - believing that it could actually prove counter productive. Nevertheless, he found that was what they hoped to achieve.
"Nonetheless, once Mr Megrahi had been diagnosed with terminal cancer in September 20008, HMG policy was based upon an assessment that UK interests would be damaged if Mr Megrahi were to die in a UK jail," Sir Gus said.
"The development of this view was prompted, following Mr Megrahi's diagnosis of terminal illness, by the extremely high priority attached to Mr Megrahi's return by the Libyans, who had made clear that they would regard his death in Scottish custody as a death sentence and by actual and implicit threats made of severe ramifications for UK interests if Mr Megrahi were to die in prison in Scotland.
"Policy was, therefore, progressively developed that HMG should do all it could, while respecting devolved competencies, to facilitate an appeal by the Libyans to the Scottish government for Mr Megrahi's transfer under the PTA (Prisoner Transfer Agreement) or for release on compassionate grounds."
Among 120 pages of documents released as a result of the review was a Foreign Office briefing note from January 2009, which describes the "prompt" return of Megrahi to Libya as "the most desirable outcome"
It states: "We do not want him to die in a Scottish jail, with the likely negative consequences for our relations with Libya."