Donald Trump has repeated unproven and unverified accusations that British intelligence agencies spied on his election campaign, just a day after the UK confirmed he had been invited to London on a state visit to meet the Queen.

The tweet also prompted GCHQ to reiterate that the US president’s claims were “utterly ridiculous”, although the foreign secretary, Jeremy Hunt, maintained that the “special relationship” remained intact.

Trump was apparently tweeting in response to an item on the conservative cable cable channel One America News Network, repeating an unproven conspiracy theory that originally dates back to 2017.

The president had tweeted that “Former CIA analyst Larry Johnson accuses United Kingdom Intelligence of helping Obama Administration Spy on the 2016 Trump Presidential Campaign,” and added: “WOW! It is now just a question of time before the truth comes out, and when it does, it will be a beauty!”

When asked about Trump’s tweet, GCHQ referred reporters to its previous denials. Giving an on-the-record statement in response to a politician is almost unheard of for the secretive agency, which is reluctant to get drawn into public disputes.

“The allegations that GCHQ was asked to conduct ‘wire tapping’ against the then president-elect are nonsense. They are utterly ridiculous and should be ignored,” the statement from the wire-tapping agency said.

Johnson was described as a “conservative conspiracy theorist” by the US media monitoring organisation Media Matters for America, which said he has made a series of untrue allegations about collusion, originally on the Russian television network RT.

On Tuesday, Britain confirmed that Trump had been invited to London for a state visit from 3 to 6 June – just before events to mark the 75th anniversary of D-Day – including dinner at Buckingham Palace.

Hailing the visit, Theresa May said the UK and US had “a deep and enduring partnership”. The prime minister addedthat the trip would be an opportunity “to strengthen our already close relationship in areas such as trade, investment, security and defence”.

Trump has been on the offensive for several days after a long-awaited special report from special counsel Robert Mueller said there was no evidence that he had conspired with Russia in pursuit of the presidency. But Mueller also concluded he could not reach a verdict on whether the president illegally obstructed justice.

Meanwhile, Hunt tweeted a picture of the bust of Winston Churchill in the US president’s Oval Office, in an attempt to reassert the so-called UK-US special relationship.

The British minister was doing so after Gérard Araud, the outgoing French ambassador in Washington, said British influence in the US capital was now negligible, partly due to the UK’s preoccupation with Brexit.

Araud told the Financial Times: “The UK has vanished. The British ambassador told me – and I loved it – that every time the British military is meeting the American military, the Americans are talking about the French.”

Hunt tweeted back to Araud: “I am sure you enjoyed making hay with the UK’s temporary Brexit travails but until there is a French president’s bust in the Oval Office we will not take any lessons in having good relations with Washington.”