He was recently diagnosed as only having months to live with advanced prostate cancer after serving just eight years of his life sentence.
The 57-year-old former Libyan agent was convicted for blowing up a Pan Am airliner over the town of Lockerbie as it flew to New York in December 1988. All 259 passengers and crew and 11 people on the ground were killed in Britain's deadliest terrorist attack.
"Some hurts can never heal, some scars can never fade," Scottish Justice Secretary Kenny MacAskill said. "Those who have been bereaved cannot be expected to forget, let alone forgive ... However, Mr. al-Megrahi now faces a sentence imposed by a higher power."
MacAskill said although al-Megrahi had not shown compassion to his victims -- many of whom were American college students flying home to New York for Christmas -- he was motivated by Scottish values to show mercy.
Al-Megrahi has always proclaimed his innocence, and convinced a few British victims' relatives that there was a miscarriage of justice. He lost an appeal of his conviction in 2002, but a Scottish review of his case ruled in 2007 that there might have been a miscarriage of justice.
White House press secretary Robert Gibbs said Thursday the United States had repeatedly asked Scotland to keep al-Megrahi in custody. "On this day, we extend our deepest sympathies to the families who live every day with the loss of their loved ones," said Gibbs.
Families of the victims are split overal-Megrahi's release. Relatives of some of the British victims said they had never been convinced of his guilt and welcomed the reports of hisrelease. Others, especially the American relatives, lashed out.
"I think it's appalling, disgusting and so sickening I can hardly find words to describe it," said Susan Cohen of Cape May Court House, N.J., whose 20-year-old daughter, Theodora, died in the attack. "This isn't about compassionate release. This is part of give-Gadhafi-what-he-wants-so-we-can-have-the-oil," she told the Associated Press.
Al-Megrahi's trial and conviction led to a major shift in Libya's relationship with the West.
Libya's leader, Moammar Gadhafi, engineered a rapprochement with his critics following the Sept. 11, 2001, terrorist attacks. He renounced terrorism, dismantled Libya's secret nuclear program, accepted his government's responsibility for the Lockerbie bombing and paid compensation to the victims' families.
Compassionate release is not unique to the Scottish justice system. The British government's secretary of state for justice, Jack Straw, recently freed Ronnie Biggs of the Great train Robbery from jail on that basis.
"My understanding is that [al-Megrahi] really is within three months of dying, which is one of the issues we wanted cleared up. At the same time, we have always maintained that he should remain in prison in Scotland and die there if it comes to that," Frank Duggan, president of Victims of Pan Am 103, a group that represents the families of the American victims, told Reuters.
"I understand though that the Libyan government has given assurances that there will be no celebratory reactions on the part of the Libyans when Megrahi gets back. We were all afraid that this guy would go back to a hero's welcome. But there's going to be no dancing in the end-zone, as the expression goes," Duggan said.
---- Compiled from wire reports and other media sources