The US has agreed not to repeat claims the UK’s communications intelligence agency wiretapped Donald Trump during the presidential election campaign.
GCHQ rejected allegations made by White House press secretary Sean Spicer, that it spied on Mr Trump, as “nonsense”.
No. 10 has been assured by Mr Spicer he would not repeat the accusation.
A spokesman for Prime Minister Theresa May said it had been made clear to US authorities the claims were “ridiculous and should have been ignored”.
GCHQ also rejected the allegations as “utterly ridiculous”. The unusual move by the agency to comment on the news came after Mr Spicer cited claims first made on US TV channel Fox News earlier this week.
Mr Trump said Trump Tower in New York was under surveillance, but has provided no evidence for the claim.
The allegations of GCHQ involvement were initially made by former judge Andrew Napolitano.
Mr Spicer quoted Mr Napolitano as saying: “Three intelligence sources have informed Fox News that President Obama went outside the chain of command.”
He said Mr Obama “didn’t use the NSA, he didn’t use the CIA, he didn’t use the FBI and he didn’t use the Department of Justice, he used GCHQ.
“What the heck is GCHQ? That’s the initials for the British spying agency. They have 24/7 access to the NSA database.”
A GCHQ spokesman said: “Recent allegations made by media commentator Judge Andrew Napolitano about GCHQ being asked to conduct ‘wiretapping’ against the then president-elect are nonsense.
“They are utterly ridiculous and should be ignored.”
It’s a bad day for the transatlantic intelligence community when Britain’s largest and best funded spy agency – GCHQ – has to come out and publicly contradict a claim made by its closest ally.
GCHQ, MI6 and MI5 rarely, if ever, comment on ongoing intelligence stories in the news.
But the allegation made by Mr Spicer was seen as so potentially damaging – as well as being untrue – that it was decided to make an exception.
The BBC understands that a discussion was held earlier this week in No 10 on whether and how to respond.
When Mr Spicer repeated his claim of GCHQ collusion on Thursday the strongly-worded denial was written and published.
Career intelligence officers on both sides of the Atlantic will now be at pains to protect their historically-close relationship from any further perceived gaffes coming out of the White House.
Sir Malcolm Rifkind, former foreign secretary, said the allegations were “foolish and very dangerous” as they implied UK government involvement.
“It’s not just about GCHQ”, he told BBC Radio 4’s World at One. “The inference is that the British government – either directly or indirectly – were involved.”
He believed it was not enough to promise not to repeat the allegation. “That’s not the same as saying it was rubbish in the first place,” he said.
Former MI5 intelligence officer Ben Owen said he would be “shocked” if the claims turned out to be true.
“It’s not something GCHQ would do”, he told the BBC’s Victoria Derbyshire programme. “They have to stick to the letter of the law.”
He said that leaks by Edward Snowden, a former contractor for the CIA, had eroded public trust in intelligence agencies.
“These stories have more credence with the public,” he said.