GCHQ – Britain’s electronic espionage agency – has dismissed fresh claims it spied on Donald Trump’s presidential election campaign as “utterly ridiculous”.

The US president highlighted a claim by a former CIA analyst that British intelligence assisted the administration of Barack Obama by spying on his 2016 run for the White House.

In a trademark tweet, Mr Trump added: “WOW! It is now just a question of time before the truth comes out, and when it does, it will be a beauty!”

However GCHQ responded by referring to a statement it issued when similar allegations surfaced in 2017 dismissing the claim it was asked to conduct “wiretapping” against the then president elect as “nonsense”.

“They are utterly ridiculous and should be ignored,” the statement said.

The row erupted the day after it was announced that Mr Trump would be making his long-awaited state visit to the UK in June.

Downing Street denied that the row risked casting a pall over the visit. Asked if Theresa May feared Mr Trump’s tweet would “sour” his trip to Britain, the Prime Minister’s official spokesman said: “No. The US and UK are long-standing partners. We do more together than any two countries in the world.

“We share intelligence that we do not share with other allies. That unparalleled sharing of intelligence between our countries has undoubtedly saved British lives.

“A state visit is an opportunity to strengthen our ties.”

The spokesman declined to make any comment on the contents of Mr Trump’s tweet, on the grounds that he never discussed security issues in public. Asked whether GCHQ was speaking on behalf of the Government, he replied: “GCHQ is indeed part of the Government.”

In his tweet, Mr Trump referenced a report by the One America News Network which referred to the claims made by Larry Johnson, a former CIA analyst.

Mr Johnson is a controversial figure in the US where he has been accused of making a series of false allegations – including one that Michelle Obama had been recorded using a slur against white people.

Trump
GCHQ has dismissed allegations it spied on the Trump campaign as ‘nonsense’ (GCHQ/PA)

The allegation that GCHQ spied on the Trump campaign at the behest of the Obama administration was first made in 2017 by Andrew Napolitano, a former judge and commentator for Fox News.

He claimed he had been told by intelligence sources that the Obama team had wanted to use the British agency so there would be “no American fingerprints on this”.

His comments were then picked up by the then-White House press secretary Sean Spicer to back up Mr Trump’s claim that the Obama administration had bugged his phones.

That prompted a rare public denial from GCHQ.

It said in a statement: “Recent allegations made by media commentator judge Andrew Napolitano about GCHQ being asked to conduct ‘wiretapping’ against the then president-elect are nonsense.”

Mr Trump’s intervention threatened to lead to new strains in the relationship with the US, just as the two countries are preparing for the president’s state visit in June.

It comes amid signs that ministers are prepared to grant Chinese tech giant Huawei a role in building the UK’s 5G network – something the US strongly opposes.

Ministers denied a decision had been taken to allow it to provide “noncore” equipment at a meeting on Tuesday of the National Security Council chaired by Theresa May, saying a final decision was expected later in the spring.

Jeremy Fleming, director of GCHQ
Jeremy Fleming, director of GCHQ, speaks at the National Cyber Security Centre annual conference in Glasgow (Andrew Milligan/PA)

However, speaking at a cyber security conference in Glasgow, the head of GCHQ Jeremy Fleming said the “flag of origin” was only a “secondary factor” when considering whether to allow particular technology to be used in the UK network.

Senior security figures have previously warned that allowing a Chinese firm access to the UK’s critical telecommunications network could jeopardise national security.

The US has banned Huawei from taking part in its government networks and has been pressing other partners in the Five Eyes intelligence alliance – the UK, Canada, Australia and New Zealand – to follow suit.

It reflects fears that the Chinese government could require it to install “back door” technology that would allow it to spy on them or disrupt their communications.