Speaking in the Oval Office on Tuesday, Trump said that he thought Kent was a “nice guy” but “weak on security”.

Trump said that Kent’s resignation letter made him realise “it was a good thing that he’s out” and that he disagreed with Kent’s assessment of the Iranian threat.

With his departure, Kent becomes the most high-profile figure from within the Trump administration to publicly criticise the US-Israeli operation in Iran.

In the letter addressed to Trump, Kent alleged that “high-ranking Israeli officials” and influential US journalists had sowed “misinformation” that led the president to undermine his “America First” platform.

“This echo chamber was used to deceive you into believing that Iran posed an imminent threat to the United States,” the letter continued. “This was a lie.”

Kent, a long-time supporter of Trump’s who unsuccessfully ran for Congress twice, was nominated by the president early in his administration and narrowly confirmed to his post, with many Democrats criticising his links to extremist groups including members of the Proud Boys.

In the confirmation hearing, Kent also refused to back away from claims that federal agents had fomented the January 6 riots at the US Capitol or that Trump had won the 2020 election.

At the National Counterterrorism Center, he reported to Director of National Intelligence Tulsi Gabbard and oversaw the analysis and detection of potential terrorist threats from around the globe.

Previously, Kent had deployed 11 times overseas with the US military, including with the US Army’s special forces in Iraq.

He later became a paramilitary officer at the CIA, before leaving government service after his wife’s death.