The Libyan government had appealed to the court to consider the two options for al-Megrahi, but relatives of the victims and political leaders in the US have urged Scotland to keep the former Libyan agent behind bars.

Hillary Clinton, the US secretary of state, has pressed Scottish authorities to make al-Megrahi serve out his 27-year sentence.

Seven US senators, including Edward Kennedy and John Kennedy, have also written to the Scottish justice minister with a similar request.

Unsuccessful appeal

Al-Megrahi, who has repeatedly protested his innocence, lost an appeal in 2002 and last year failed to secure his release on the grounds he was dying.

However, there is a fear is that unless a public inquiry into Lockerbie is held, then evidence that would have come to light at al-Megrahi's appeal will never be publicly known.

In depth

 Profile: Abdel Basset al-Megrahi
  Video: Opinions divided over Lockerbie appeal
 Video: Lockerbie remembered

"His absolute priority in the little time he has left is to spend it with his family in his homeland," Maggie Scott, his lawyer, told Edinburgh's high court earlier this week.

She said his condition was "very grave" and that he was "very weak, he is suffering from severe pain and he is in distress".

His lawyers began an appeal In May this year against his conviction at a court in Edinburgh, saying the case against him was flawed.

Under a transfer agreement signed between Libya and Britain, al-Megrahi could be sent back to Libya to serve the remainder of his minimum 27-year jail sentence.

Four years after al-Megrahi's conviction in 2001, Libya accepted responsibility for the attack and agreed to pay about $2.7bn in compensation to the families of those killed in the attack.

That move prompted the lifting of international sanctions against Libya and led to a restoration in diplomatic ties between Tripoli and the West.