Megrahi, a Libyan intelligence officer, always denied any responsibility for the bombing of Pan Am Flight 103 in December 1988.

It remains the deadliest terrorist incident ever to have taken place on British soil.

All 259 people aboard the plane, which was travelling from London to New York, were killed, along with 11 others on the ground.

Investigators tracing the origins of scraps of clothes wrapped around the bomb followed a trail to a shop in Malta which led them, eventually, to Megrahi.

He and another Libyan, Al Amin Khalifa Fhimah, were indicted by the Scottish and US courts in November 1991.

But Libya refused to extradite them. In 1999, after protracted negotiations, Libya handed the two men over for trial, under Scottish law but on neutral ground, the former US airbase at Camp Zeist in the Netherlands.

Media playback is unsupported on your device

Media captionCameron: "Today is a day to remember the 270 people who lost their lives in an appalling terrorist act"

Their trial began in May 2000. Fhimah was acquitted of all charges, but Megrahi was found guilty and sentenced to a minimum of 27 years in prison.

He served the first part of his sentence at the maximum-security prison at Barlinnie, in Glasgow, but was transferred in 2005 to Greenock prison.

He lost his first appeal against conviction in 2002 but in 2007, his case was referred back to senior Scottish judges. He dropped that second case two days before he was released.

No extradition

Last August, after the fall of Libyan leader Col Muammar Gaddafi, Megrahi was reported to be "in and out of a coma" at his home in Tripoli.

There have been calls for him to be returned to jail in the UK or tried in the US.

Media playback is unsupported on your device

Media captionMegrahi's brother says he was a "sacrifice"

But shortly after they toppled Col Gaddafi, Libyan rebel leaders said they would not extradite Megrahi or any other Libyan.

The BBC's Scotland correspondent James Cook says Scottish and American officials have been to Tripoli, trying to persuade the new Libyan government to grant visas to detectives from Dumfriesshire.

They are still searching for the answers to the questions of who ordered the bombing and who else was involved, our correspondent says, but it is not clear whether the Libyans will co-operate.

However, a spokesman for the interim government in Tripoli, the National Transitional Council (NTC), told Reuters that that Megrahi's death would not end its investigations into Lockerbie.