President Donald Trump with British Prime Minister Theresa May after their meeting at the White House on January 27. REUTERS/Kevin Lamarque The US has made a "formal apology" to Britain over accusations that a UK spy agency worked with President Barack Obama to wiretap Trump Tower before the election, according to The Telegraph.

The White House press secretary, Sean Spicer, claimed in a briefing on Thursday that Obama partnered with the UK's Government Communications Headquarters for an operation spying on Trump Tower during the 2016 presidential campaign.

The Telegraph reports that both Spicer and National Security Adviser H.R. McMaster apologized to Britain.

A White House official said: "Ambassador Kim Darroch and Sir Mark Lyall expressed their concerns to Sean Spicer and General McMaster. Mr. Spicer and General McMaster explained that Mr. Spicer was simply pointing to public reports, not endorsing any specific story."

McMaster apologized directly to Sir Mark Lyall Grant, Prime Minister Theresa May's security chief, according to The Sun.

"General McMaster also reassured No10 that the White House would never repeat the embarrassment, which threatened to put crucial Trans-Atlantic intelligence cooperation at risk," The Sun reports.

During a White House press briefing on Thursday, Spicer cited comments from Fox News commentator Andrew Napolitano that Spicer said confirmed that GCHQ took part in a spy operation at Trump Tower.

"Three intelligence sources have informed Fox News that President Obama went outside the chain of command," Spicer said, reading from notes in the White House press room on Thursday.

Obama, Spicer said, "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," Spicer continued. "What is that? It's the initials for the British Intelligence Spying Agency."

A representative for GCHQ quickly issued a statement debunking the Fox News report to which Spicer was referring.

"Recent allegations made by media commentator judge Andrew Napolitano about GCHQ being asked to conduct 'wiretapping' against the then president-elect are nonsense," the statement said. "They are utterly ridiculous and should be ignored."