The UK's intelligence and security organisation has issued a rare public statement dismissing allegations made in the US that it had helped former president Barack Obama spy on Donald Trump when he was a presidential candidate.

In a break from its usual practice of declining to comment on its activities, the GCHQ's 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."

The statement comes after the chairman of the US Senate Intelligence Committee Richard Burr said that there is no indication that Trump was wiretapped during his election campaign.

President Trump has been under pressure to justify his wiretapping claims, with his administration trying very hard to back his unsubstantiated allegation that he initially made through a series of tweets in early March.

GCHQ was dragged into the wiretapping controversy when an analyst on Fox News picked up on Trump's allegation and claimed that the spy agency was used by Obama to spy on Trump Tower ahead of the presidential elections in November 2016.

Napolitano claimed that three intelligence sources had informed Fox News that Obama had gone "outside the chain of command" and used the GCHQ in spying on Trump. He said by doing so, Obama ensured there was "no American fingerprints on this."

Trump first tweeted wiretapping allegations in March

Trump Obama
Trump accuses Obama of wiretapping Trump Tower during the presidential elections but offers no evidence Getty Images

In his early March tweets,Trump accused the Obama administration of wiretapping Trump Tower at the height of the US presidential elections in October 2016.

He did not offer any evidence but said. "Terrible! Just found out that Obama had my 'wires tapped' in Trump Tower just before the victory. Nothing found. This is McCarthyism!"

HIs second tweet, 14 minutes later said: "Is it legal for a sitting President to be 'wire tapping' a race for president prior to an election? Turned down by a court earlier. A NEW LOW!."

Three minutes later, he tweeted: "I'd bet a good lawyer could make a great case out of the fact that President Obama was tapping my phones in October, just prior to Election."

His unsubstantiated claims led to pressure for a formal investigation as his administration sought to defend his comments. White House Press Secretary Sean Spicer said: "Reports concerning potentially politically motivated investigations immediately ahead of the 2016 election are very troubling."

Obama has already denied the allegations saying that they were "simply false".

UK wishes to steer clear of toxic row in Washington

The BBC notes that while it was unusual for the GCHQ to comment directly on a report about its intelligence work, the allegations "are so sensitive that the agency clearly felt that they could not let them go unchallenged."

It added: "... British intelligence is clearly determined to avoid being drawn into what is an increasingly toxic row in Washington."

On 15 March, a British security official told Reuters that under British law, GCHQ could "only gather intelligence for national security purposes" and that the US election "clearly doesn't meet that criteria."

A British government source had also said that the claims made were "totally untrue and quite frankly absurd."

Liberal Democrat leader Tim Farron was quoted by The Telegraph as describing Trump's allegations as "shameful." He said Trump was "compromising the vital UK-US security relationship to try to cover his own embarrassment. This harms our and US security."

Similarly the National Security Adviser for Obama, Susan Rice tweeted: "The cost of falsely blaming our closest ally for something this consequential cannot be overstated."