A former Libyan agent jailed for life for the 1988 Lockerbie bombing that killed 270 people flew home on Thursday after Scottish authorities released him on compassionate grounds because he is dying of cancer.

Abdel Basset al-Megrahi, believed to have less than three months to live, was released on the order of Scotland's justice minister despite strong opposition from the United States, which had campaigned to keep him in prison.

Pan Am flight 103 was carrying 189 Americans when it left London for New York on December 21, 1988. In all, 259 people on board and 11 on the ground were killed in the bombing.

He is a dying man, he is terminally ill, Scottish justice minister Kenny MacAskill told reporters in explanation. My decision is that he returns home to die.

Megrahi, wearing a white tracksuit and baseball cap and clutching a white scarf to his face, walked uneasily up the steps to a Libyan aircraft at Glasgow Airport with the aid of a stick. The plane then left to fly him home to Tripoli.

In a statement issued by his lawyer after his departure, Megrahi said that he was innocent and had been wrongly jailed, but also thanked the people of Scotland for setting him free.

To those victims' relatives who can bear to hear me say this: they continue to have my sincere sympathy for the unimaginable loss that they have suffered, he said. Those who bear me ill will, I do not return that to you.

This horrible ordeal is not ended by my return to Libya. It may never end for me until I die. Perhaps the only liberation for me will be death.

The United States government, which opposed Megrahi's early release, said it deeply regretted the decision.

As we have expressed repeatedly to officials of the government of the United Kingdom and to Scottish authorities, we continue to believe that Megrahi should serve out his sentence in Scotland, the White House said in a statement.

Megrahi, 57, is the only person convicted of the bombing. He maintained his innocence, but lost an appeal against his conviction in 2002, though a Scottish review board ruled in 2007 that there might have been a miscarriage of justice. A second appeal was withdrawn this week, opening the way for his release on compassionate grounds.

NO HERO'S WELCOME

Relatives of many of the American victims thought Megrahi should have served his full life sentence in prison after being convicted of Britain's deadliest terrorist attack.

Frank Duggan, president of the Victims of Pan Am 103, a group that represents the families of U.S. victims, said he understood the Libyan government had promised that Megrahi would not go back to a hero's welcome.

There is going to be no dancing in the end-zone, as the expression goes, he told Reuters.

But that did not seem to be the case as hundreds of young Libyans gathered at Tripoli's Mitiga Airport where Megrahi's plane was expected to land. Many waved the national flag and held banners of praise for Libya's government and for Megrahi.

Many banners carried the name of Libya's National Youth Association. One read: You promised and you fulfilled the promise and you returned Abdel Basset al-Megrahi to his family.

While the relatives of many American victims were convinced of Megrahi's guilt, the families of many Britons killed have questioned the quality of the evidence used to convict Megrahi and some have campaigned for his release to die back in Libya.

I am delighted. I don't think he had anything to do with it and I think he was effectively framed, Jim Swire, whose daughter Flora died in the bombing, told Reuters.

While Megrahi's departure from Britain draws a line under an eight-year saga, the implications of his release for British-Libyan relations could be seen for years to come.

Libyan leader Muammar Gaddafi sees Megrahi's freedom as one of the rewards he has received from Western powers for giving up his nuclear ambitions in 2003, Libya analysts say. The United States, Britain and other nations have normalized relations with Libya in recent years, and business with Libya has grown.

For Scotland, though, the Megrahi affair has been a millstone as it tried to balance American opposition to his release with the support of British companies looking for business deals with Tripoli.

The government, led by the separatist Scottish National Party, has devolved powers from the rest of Britain on justice and other policies, and Scotland has its own legal system.

The British oil company BP ended a 30-year absence from Libya in 2007 when it signed a bilateral deal for its biggest exploration commitment. Royal Dutch Shell also wants to tap Libya's reserves, the biggest in Africa.

Former British ambassador to Libya Oliver Miles played down the benefits to Britain and said the release was only one part of a long process of improving relations.

It removes an irritant, but it wasn't a great irritant, he told Reuters. I don't think it is going to give us lots of lovely new business.