Gordon Brown faced fresh questions tonight after it emerged that he discussed with Colonel Gaddafi detailed conditions for the Lockerbie bomber's return nearly six weeks ago, while senior Labour figures warned of an economic backlash from angry Americans "costing our country dear".

Downing Street released the text of a cordial letter sent to the Libyan leader on the day that Abdulbaset al-Megrahi was released, asking that the event be kept low key because a "high-profile" ceremony would distress his victims and their families.

But critically the letter also refers to a meeting between the two leaders six weeks earlier at the G8 summit in Italy, adding that "when we met [there] I stressed that, should the Scottish executive decide that Megrahi can return to Libya, this should be a purely private family occasion" rather than a public celebration.

Previously officials have said that the two men's conversation in Italy at the beginning of July was brief and that, while the Lockerbie case was raised, Brown merely stressed the matter was one for the Scottish government to decide.

However, the new letter, addressed to "Dear Muammar" and signed off by wishing him a happy Ramadan, suggests that the decision was well enough advanced and Brown well enough briefed to set terms for a homecoming – albeit unsuccessfully. A jubilant Libyan crowd, some waving Scottish flags, greeted Megrahi at the airport.

Meanwhile, details emerged of a second letter written by the Foreign Office minister Ivan Lewis to the Scottish justice minister, Kenny MacAskill, confirming that there were no legal reasons not to let Megrahi go and concluding: "I hope on this basis you will now feel able to consider the Libyan application."

Although the Foreign Office said it was not intended to make representations either way, the leaking of the letter suggests the SNP-led administration may be starting to fight back.

Tonight the shadow foreign secretary, William Hague, redoubled calls for the government to release official records of conversations about the release, as Gaddafi increased the embarrassment by publicly thanking "my friend Brown, his government, the Queen of Britain, Elizabeth, and Prince Andrew who all contributed to encouraging the Scottish government to take this historic and courageous decision".

The scale of fury in America was laid bare in a vitriolic letter from the director of the FBI, Robert Mueller – who as a justice department lawyer led the investigation into the bombing – describing the release in a scathing letter to MacAskill as a "mockery of the rule of law" and of the victims' grief.

However, the Scottish government last night responded defiantly, insisting the US had made clear in discussions that, while it opposed Megrahi's release, it regarded freeing him on compassionate grounds because of his terminal cancer as "far preferable" to a prisoner transfer deal that would have seen him in custody.

Fears that the US could retaliate against the British government were eased when Whitehall sources disclosed that the White House had made no complaint to Downing Street, reserving its ire for the Scottish administration.

However, public anger at scenes of the convicted bomber receiving a hero's welcome has prompted demands from ordinary Americans for economic reprisals, with two websites set up to promote a boycott and angry Americans discussing on Twitter which products they should avoid, from Scotch whisky to Highland holidays.

Senior Scottish Labour figures say that MacAskill's references in his original statement last week to the compassion of Scotland's people had turned the entire country, which earns £260m a year through American tourists, into an economic target.

Iain Gray, Labour leader in Scotland, said: "Those calling for a boycott of Scotland are emboldened by [MacAskill's] foolish claim that the decision was taken in the name of the people of Scotland. In seeking to portray this as a decision supported by the whole of the country, he has damaged Scotland's reputation. It shows serious lack of judgment which has cost our country dear."

Jack McConnell, the former Labour first minister, said the decision damaged Scotland in a way "that will take years to recover" and called on MSPs to show it did not have popular support.

A spokesman for the Scotch Whisky Association said it was "monitoring" the situation, but hoped that initial anger would pass, as it has done in past protests. "We hope that people recognise that this is not necessarily the solution."

The business secretary, Lord Mandelson, left hospital today – where he was recovering from a prostate operation – insisting it was "completely wrong" and "offensive" to suggest that Megrahi's release was linked to trade deals over oil and gas.

Mandelson met Gaddafi's son during a holiday in Corfu this month, several weeks after the prime minister's meeting in Italy, and has admitted the Lockerbie issue was raised. Today he said the Libyans had had "the same response from me as they would have had from any other member of the government".

MacAskill will give a statement on Monday to the Scottish parliament, which has been recalled from recess. He is likely to face tough questioning on why the convicted bomber was not transferred to a Libyan jail.

McConnell said it was a "big if" to suggest that the convicted bomber deserved compassionate treatment but even then, allowing Megrahi "to be welcomed home in Libya as a free man should have been the last option on the list. There were other options that could have been applied if the Scottish government had the will."

However, Monday's session could also examine the political manoeuvrings around the deal, with MacAskill said to believe that he was set up by the British government's refusal to respond to his consultation.

Yesterday John Bolton, former US ambassador to the UN, also called for a congressional hearing into how the US government lobbied Britain over the issue, which could shed new light on the British response.