A royal visit to Libya is being reconsidered after the welcome given to the Lockerbie bomber on his return to the country, the BBC understands.
The Foreign Office is reviewing plans for Prince Andrew, the Duke of York, to meet senior figures and promote trade.
The visit - planned for early September - now seems unlikely to go ahead.
It also emerged that the prime minister had written to Colonel Gaddafi asking that Libya "act with sensitivity" when Megrahi returned home.
Downing Street said Gordon Brown had sent the letter on Thursday, ahead of the bomber's release from prison.
Foreign Secretary David Miliband has described the celebratory welcome in Libya for Abdelbaset Ali al-Megrahi as "deeply distressing".
BBC Diplomatic Correspondent James Robbins said he understood the royal visit - which had not yet been made public - was now unlikely to proceed.
"It would be the Duke of York's third visit to Libya," he said.
"Last year he met Colonel Gaddafi and previously he has met a series of senior Libyan ministers in his role as Britain's special representative for trade and investment.
Scotland's First Minister Alex Salmond said that the decision had been made "for the right reasons"
"Britain has secured huge contracts with Libya, particularly in the energy sector, in recent years as the country has returned from deep international isolation."
The Duke's spokesman said a trip to Libya in early September had been "in its planning stages".
He added: "We will continue to take advice from the Foreign Office as we do with all overseas royal visits."
The foreign secretary has said he deplored the welcome Megrahi received in Tripoli on Thursday.
But Mr Miliband refused to comment on whether he believed the Scottish Government was right to free him.
Crowds in Tripoli, some waving Saltires, greeted Megrahi after he was freed on compassionate grounds.
Scottish First Minister Alex Salmond said the reception was "inappropriate".
The welcome Megrahi received on his return to Libya also prompted an angry reaction from families of those killed in the 1988 bombing, which brought down Pan Am flight 103 over the town of Lockerbie, in southern Scotland.
US President Barack Obama described the Scottish Government's decision to free Megrahi as a "mistake" and said his administration had told the Libyan government that Megrahi, who has terminal cancer, should not receive a hero's welcome and should instead be placed under house arrest.
Mr Miliband, the first UK minister to comment on Megrahi's release, said the scenes in Tripoli were deeply distressing.
He added: "Obviously the sight of a mass murderer getting a hero's welcome in Tripoli is deeply upsetting, and deeply upsetting above all for the 270 families who grieve every day for the loss of their loved ones 21 years ago, but also for anyone who's got an ounce of humanity in them and I think that is the overriding emotion that people will be feeling today.
Saltires were waved by some of those waiting at the airport
"I think it is very important that Libya knows, and certainly we have told them, that how the Libyan government handles itself in the next few days after the arrival of Mr Megrahi will be very significant in the way the world views Libya's re-entry into the civilised community of nations."
He said there had been no pressure from Westminster on the Scottish Government to release Megrahi.
Mr Salmond said the welcome received by Megrahi was "unwise".
He said: "I don't think the reception for Mr al-Megrahi was appropriate in Libya. I don't think that was wise and I don't think that was the right thing to do."
He said he supported Scottish Justice Secretary Kenny MacAskill's decision to release Megrahi on compassionate grounds, and denied it had damaged Scotland's relationship with the United States.
He said: "The international politics of the situation are not, correctly in my view, a matter for the justice secretary.
"We're not responsible for the actions of others and I don't agree that we've damaged Scotland's reputation."
The Scottish Parliament is to be recalled on Monday to discuss the controversial decision to release Megrahi.
Alex Salmond's government has made a mistake of international proportions
David Mundell Conservative MP
Russell Brown, Labour MP for Dumfries, said seeing the Saltire at Tripoli airport was "stomach churning" and condemned the Scottish Government for failing to seek adequate assurances that the Lockerbie bomber would not be hailed a hero on his return to Libya.
He said: "I have never been ashamed to see my country's flag waved before, but to see it misused to celebrate mass murder is outrageous.
"This man is convicted of murdering 270 people in my part of Scotland and that conviction stands.
"This adds further pressure to the SNP to explain why they have freed a man who showed no remorse for the crimes he has committed."
David Mundell, Conservative MP for Dumfriesshire, Clydesdale and Tweeddale, said the scenes from Tripoli were "sickening".
He said: "This is as we feared and why we said that Mr Megrahi should be kept in Scotland.
"Alex Salmond's government has made a mistake of international proportions."
Scottish Justice Secretary Kenny MacAskill announced the release order on Thursday afternoon, saying Megrahi probably had about three months to live.
The fact that Megrahi's victims were shown no compassion was "not a reason for us to deny compassion to him and his family in his final days", he said.
Tony Kelly, a solicitor acting on behalf of Megrahi, said his client was still interested in clearing his name in the "court of public opinion."
He said: "In the statement I issued on his behalf yesterday he talked about the appalling choice he had to make.
"He had to say whether he was going to stay here and die in prison with a view to trying to clear his name posthumously, or to abandon the appeal with a view to get himself home so he could go back to the bosom of his family."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.