Obituary: Abdelbaset al-Megrahi
Abdelbaset al-Megrahi is the only person to have been convicted for the bombing of Pan Am flight 103 over the Scottish town of Lockerbie on 21 Dec 1988.
The attack, which killed 270 people in the plane and on the ground, remains the deadliest terrorist incident ever to have taken place on British soil.
He always denied he had been responsible, but a series of appeals was halted when he was diagnosed with cancer and, controversially, released from prison in Scotland on compassionate grounds.
Abdelbaset Ali Mohmed al-Megrahi was born in the Libyan capital, Tripoli, on 1 April 1952.
He studied in the US and also visited Britain "four or five times" during the 1970s when he is said to have spent nine months studying in Cardiff.
He described himself as the former director of Libya's Centre for Strategic Studies, a role which - the FBI claimed - gave him cover to act as an intelligence officer for the Libyan Intelligence Services (JSO).
Suggestions that he was related to the Libyan leader, Muammar Gaddafi, were never substantiated - but Megrahi had close connections to the Libyan government.
He was a cousin of Said Rashid, a fellow senior JSO member and influential member of the government, who played a key role in Libya's anti-US policies during the 1980s.
It was his role as chief of security for Libyan Arab Airlines (LAA) which, prosecutors later argued, allowed him to carry out the bombing.
LAA had an office in Malta, where Libyans were able to move freely. From there, Megrahi was able to use as many as four false passports to travel to Zurich, where the timing device for the bomb was made.
Pan Am flight 103 left London's Heathrow Airport at 1825 GMT on 21 Dec 1988, bound for New York with 243 passengers and 16 crew members on board.
At just after 1900 an explosion in the plane's forward cargo hold tore the side out of the Boeing 747 which quickly broke up and fell onto the small town of Lockerbie in the Dumfries & Galloway region of Scotland.
As well as the 259 people on board the plane, 11 residents of Lockerbie died on the ground as a result of a giant fireball caused when a wing holding thousands of gallons of fuel exploded on impact.
It was scraps of clothes wrapped around the bomb which detonated aboard the airliner that led investigators to a shop in Malta and, eventually, to Megrahi.
Trial in Holland
In November 1991 Megrahi, and a fellow Libyan, Al Amin Khalifa Fhimah, were indicted by the Scottish Lord Advocate and the US Attorney General for the bombing of Flight 103.
Libya refused to extradite the two men and Megrahi spent eight years living under armed guard - relying on a small LAA pension and work as a teacher - before he and his co-defendant were handed over for trial.
Eventually, after protracted negotiations with Libya, it was agreed the trial would be held under Scots law but in a neutral country.
The two men were handed over in 1999 and the trial finally began in May 2000 at Camp Zeist, a former US Air Force base in the Netherlands.
In television interviews shown to the court, Megrahi appeared gentle. He told reporters: "I'm a quiet man. I never had any problem with anybody," and said he felt sorry for the people of Lockerbie.
After nine months, three Scottish judges found him guilty and a subsequent appeal was rejected. He was sentenced to life in prison, with a minimum term of 27 years. Fhimah was acquitted of all charges.
Megrahi served the first part of his sentence in Glasgow's Barlinnie prison, segregated in a high-security area dubbed "Gaddafi's Cafe", where there was said to be a sitting room and kitchen where halal food was specially prepared.
The former South African president Nelson Mandela, who had helped broker the deal which allowed the trial to take place, visited him there and called for him to be moved to a Muslim country to avoid harassment from other prisoners.
However, in 2005, he was transferred to nearby HMP Greenock, where there were no special provisions and he mixed with other "lifers".
Megrahi was given a fresh chance to clear his name when the Scottish Criminal Cases Review Commission (SCCRC) referred his case back to appeal judges for a second time.
In October 2008 It was announced that Megrahi was suffering from prostate cancer and his lawyers urged the court to speed up the appeal process.
The hearing, which began in April 2009, had the backing of ex-Labour MP Tam Dalyell and Dr Jim Swire, whose daughter Flora died in the bombing.
However, in Aug 2009, Megrahi abruptly withdrew his appeal and on 20 August the Scottish Justice Secretary, Kenny MacAskill, granted his release on compassionate grounds and he was flown back to Libya.
The decision caused a storm of protest from politicians in both the UK and the United States, not least because of what was termed his "hero's welcome" when he arrived home in Tripoli.
The UK justice secretary, Jack Straw, was forced to publicly deny allegations that the British government had sanctioned Megrahi's release in the interests of improving trade relations with Libya.
Megrahi always maintained that he was innocent, a view that was shared by some commentators and relatives of the victims.
In a statement released by his lawyers, Megrahi said: "Many people, including the relatives of those who died in, and over, Lockerbie, are, I know, upset that my appeal has come to an end; that nothing more can be done about the circumstances surrounding the Lockerbie bombing. I share their frustration. I had most to gain and nothing to lose about the whole truth coming out - until my diagnosis of cancer."
Considerable doubt has been raised over the safety of Megrahi's conviction, and a number of conspiracy theories have circulated over the years as to who was responsible for the outrage.
The withdrawal of his second appeal, and his subsequent death, has, according to some observers, made it less likely that the truth about the bombing of Pan Am 103 will ever be known.