(FILES) In this file photo taken on May 23, 2017, former CIA Director John Brennan is sworn in before testifying at a House Permanent Select Committee on Intelligence about Russian actions in the 2016 election during a hearing on Capitol Hill in Washington, DC. Donald Trump has revoked the security clearance of former Central Intelligence Agency director John Brennan, the White House said Wednesday, August 15, 2018, denying the frequent critic of the president any access to sensitive information. / AFP PHOTO / SAUL LOEB

Former CIA directors and another half dozen of America’s most senior spies have issued an unprecedented condemnation of President Donald Trump, after his decision to blacklist their colleague John Brennan.

In a statement, ex CIA bosses appointed by Republican and Democratic presidents — including Robert Gates, George Tenet, Porter Goss, Leon Panetta, David Petraeus — denounced Trump’s decision to strip Brennan of his security clearance.

“The president’s action regarding John Brennan and the threats of similar action against other former officials has nothing to do with who should and should not hold security clearances — and everything to do with an attempt to stifle free speech,” the statement read.

Describing Trump’s move as “inappropriate and deeply regrettable” they insisted “we have never before seen the approval or removal of security clearances used as a political tool, as was done in this case.”

After the White House said Brennan — a notable Trump critic — had been stripped of clearance due to his “erratic” behavior, Trump admitted it was because of his criticism and comments on Trump campaign ties with Russia.

In an interview with the Wall Street Journal, Trump admitted his decision on Brennan’s clearance was linked to the ongoing federal probe into collusion between his campaign and Russia to rig the 2016 election.

“I call it the rigged witch hunt, [it] is a sham, Trump was quoted as saying “and these people led it!”

“So I think it’s something that had to be done,” he added.

Trump’s actions have been widely condemned, including by respected former admiral William McRaven, the commander of the US Navy SEAL raid that killed Osama bin Laden.

“Through your actions, you have embarrassed us in the eyes of our children, humiliated us on the world stage and, worst of all, divided us as a nation,” he said.

But most of Trump’s Republican allies have defended the move or refused to condemn it publicly.