Megrahi is making a second appeal against his conviction
The Lockerbie bomber has not been excluded from a possible deal on prisoner transfers between the UK and Libya, according to Jack Straw.
The UK justice secretary said the fate of Abdelbaset Ali Mohmed al-Megrahi was a "matter for discussion" with the Scottish Executive.
A row broke out after Tony Blair and Colonel Gaddafi signed a memorandum of understanding on prisoner transfer.
Downing Street said at the time that the agreement did not cover Megrahi.
However, Mr Straw has now made clear that the Lockerbie bomber's transfer has not been explicitly ruled out.
The justice secretary, who was visiting Holyrood, said the "final call" would have to be agreed with the executive - which remains opposed to such a move.
Mr Straw was speaking after meeting First Minister Alex Salmond and Scottish Justice Secretary Kenny MacAskill.
It emerged last month that the UK Government had signed a memorandum of understanding on 29 May with Libya covering prisoner exchanges.
Mr Salmond claimed at the time that the deal could allow Megrahi to serve the remainder of his sentence in Libya and he protested to Mr Blair about a lack of consultation with the executive.
However, the UK Government insisted the document did not cover the Lockerbie case and that no deal had been signed over the Libyan's future.
Megrahi has been granted leave to appeal against his conviction for a second time.
'Ready to consult'
In response to questions about Megrahi's future, Mr Straw said no deal had yet been done with Libya on prisoner transfers.
He said the UK Government was "very ready to consult and involve the Scottish Executive in the appropriate level of discussion".
"A fundamental factor in the decisions that relate to Scotland in any prisoner transfer agreement, if one is agreed, are what the Scottish Parliament and executive want," he said.
"Are we at UK level going to make decisions relating to where the Lockerbie bomber serves his sentence without the concurrence of the Scottish Executive? No."
Mr Straw promised to avoid future rows with the SNP government at Holyrood and said UK ministers would "learn" from the cross-border rift.
He and Mr Salmond discussed a range of issues, including the attack on Glasgow Airport and the high level of co-operation between the UK and Scottish governments over the anti-terror operation.
A spokesman for Mr Salmond said it had been a very positive meeting.
"It was just about ensuring we have the right level of co-operation in the future," he said.
"There was an agreement that close levels of co-operation were necessary in that instance and equally that it's important we have that in the future."