Abdelbaset Ali Mohmed Al Megrahi has terminal prostate cancer and has also lodged a separate application for compassionate release.

The pair met in Greenock prison where Megrahi is serving a life sentence for his 2001 conviction for blowing up Pan Am flight 103 in December 1988, which left 270 people dead.

Mr MacAskill, who has the final say over whether Megrahi should be transferred or released, arrived in his ministerial car at 9am and left an hour later, making no comment.

Megrahi’s lawyer Tony Kelly also took part in the visit but made no comment as he left the jail just after 10am.

The Libyan authorities have asked for Megrahi to be moved to a jail in his homeland under the recently agreed prisoner transfer agreement.

Mr MacAskill cannot grant the prisoner a transfer while his appeal against his conviction for the bombing goes through the courts.

However, the Justice Secretary can still consider the application from Libya.

Megrahi has also made a separate appeal for release on compassionate grounds as he has terminal cancer.

He would not have to drop his appeal for this to be granted, unlike the prisoner transfer option.

Mr MacAskill has said that political and economic factors will not influence his decision and that a 90-day deadline on the prisoner transfer will not be met.

The minister has spoken to the US Attorney General and the US and British families of the Lockerbie bomb victims.

It emerged earlier this month that no decision on the appeal against conviction will be reached until the autumn, after one of the judges involved had heart surgery.

SNP backbencher Christine Grahame, who has already met Megrahi in jail, said he should be given compassionate release.

Ms Grahame, MSP for South of Scotland, said she believed there had been a miscarriage of justice.

But she added: “The trouble with a prisoner transfer is it will never be resolved through the Scottish courts.

“The appeal must proceed, and justice be done and seen to be done.”

Asked if Mr MacAskill’s visit set a “very dangerous precedent”, she replied: “I think it’s appropriate that when someone’s considering what’s to happen to someone who’s terminally ill and in prison that all aspects are examined.”