The man convicted of the Lockerbie bombing will remain in jail while his appeal continues, a court has ruled.
Lawyers for Abdelbaset Ali al-Megrahi, who has advanced prostate cancer, had asked the Appeal Court in Edinburgh to grant him interim liberation.
The Libyan is appealing against his conviction for the murder of 270 people when Pan Am Flight 103 exploded over Lockerbie in 1988.
A full hearing is likely to take place in the middle of next year.
The judgement on the bail application was delivered on Friday by the Lord Justice General Lord Hamilton, along with Lord Kingarth and Lord Wheatley.
Lord Hamilton said the "critical question" was whether the applicant's health condition was such that the court should allow him bail on compassionate grounds.
"On balance the court is not persuaded, on the information before it, that it should," he said.
"While the disease from which the appellant suffers is incurable and may cause his death, he is not at present suffering material pain or disability.
"The full services of the National Health Service are available to him, notwithstanding he is in custody."
He added that there appeared to be no immediate prospect of serious deterioration in his condition.
"If he responds well to the course of palliative treatment which he has now started, his life expectancy may be in years," said Lord Hamilton.
However, the judges said they would consider a fresh appeal for bail if the Libyan's prognosis became "both more certain and poorer".
Outside court, a statement was read by Professor Robert Black on behalf of Dr Jim Swire, whose daughter Flora was killed on Flight 103.
Prof Robert Black reads a relative's statement: 'This looks uncomfortably like an aspect of revenge or timidity'
He said he believed Scottish justice had missed a "golden opportunity" to show mercy to a dying man who posed little risk of absconding or reoffending.
"It is difficult, therefore, to see what justification there could be for today's decision," he said.
"It is, of course, true that with so many victims' relatives involved there would have been harsh criticism from some had he been released.
"For some of those it would have caused real distress."
Dr Swire said the UK Families Flight 103 group had never sought revenge but the court's verdict looked "uncomfortably like either an aspect of revenge or perhaps timidity".
He added that he hoped the Libyan would now apply to the Scottish Government for release.
However, Kathleen Flynn who lost her son JP at Lockerbie, said she believed justice had prevailed.
"It just doesn't make any sense to me that we would let somebody out of prison when they blew up an American plane," she said.
Solicitor Tony Kelly read a statement on behalf of Megrahi.
"I am very distressed that the court has refused me bail pending the hearing of my appeal and the chance to spend my remaining time with my family," he said.
"I wish to reiterate that I had nothing whatsoever to do with the Lockerbie bombing and that the fight for justice will continue regardless of whether I am alive to witness my name being cleared."
He also thanked the people who had sent him letters of support and asked that the privacy of his family be respected at a "very difficult time".
Megrahi was convicted of the Lockerbie bombing in 2001.
He has already lost a first appeal against that decision but the Scottish Criminal Cases Review Commission (SCCRC) ruled another one should take place.
That process got under way in June 2007 and is still ongoing.