In backing John Brennan’s right to keep his top-secret security clearance, despite his having charged the president with treason, the U.S. intel community has chosen to fight on indefensible terrain.

Former Director of National Intelligence James Clapper seemed to recognize that Sunday when he conceded that ex-CIA Director Brennan had the subtlety of “a freight train” and his rhetoric had become “an issue in and of itself.”

After Donald Trump’s Helsinki summit with Vladimir Putin, Brennan had called the president’s actions “nothing short of treasonous.”

The battle is now engaged. Trump cannot back down. He must defy and defeat the old bulls of the intel community. And he can.

For a security clearance is not a right. It is a privilege, an honor and a necessity for those serving in the security agencies of the U.S. government — while they serve.

Brennan is not being deprived of his First Amendment rights. He can still make any accusation and call the president any name he wishes.

But to argue that a charge of treason against a president is not a justification for pulling a clearance is a claim both arrogant and absurd.

Brennan is now threatening to sue the president. Bring it on, says national security adviser John Bolton.

With 4 million Americans holding top-secret clearances, and this city awash in leaks to the media from present and past intel and security officials, it is time to strip the swamp creatures of their special privileges.

The White House should press upon Congress a policy of automatic cancellation of security clearances, for intelligence and military officers, upon resignation, retirement or severance.

Clearances should be retained only for departing officers who can demonstrate that their “need to know” national secrets remains crucial to our security, not merely advantageous to their pursuit of lucrative jobs in the military-industrial complex.

Officials in the security realm who take clearances with them on leaving office are like House members who retain all the access, perks and privileges of Congress after they step down to earn seven-figure salaries lobbying their former congressional colleagues.

Trump is said to be evaluating pulling the security clearances of Clapper, ex-FBI Director James Comey, former CIA Director Michael Hayden, former Deputy FBI Director Andrew McCabe, former FBI counterintelligence official Peter Strzok and former FBI lawyer Lisa Page.

This is a good start. Some of these individuals have been fired. Some are under investigation. Some were involved in the FBI’s “get-Trump” cabal to prevent his election and then to abort his presidency.

Some have become talking heads on cable TV, exploiting the credibility of their former titles and offices to undermine an elected president.

They should be stripped of their clearances to show the nation that the president is dealing with insiders who have joined the Resistance.

Trump’s enemies, and they are legion, want to see Robert Mueller charge him with collusion with Russia and obstructing the investigation of that collusion.

For Trump, a truce or a negotiated peace with these people is never going to happen. But this issue of security clearances is a battlefield where the president cannot lose, if he fights wisely.

Americans sense that these are privileges that should be extended to those who protect us, not perks for former officials to exploit and monetize while they attempt to bring down the commander in chief.