President Trump. (Mandel Ngan/AFP/Getty Images)

David Kris is a founder of Culper Partners, a security and technology consulting firm, and was the assistant attorney general for national security from 2009-2011.

President Trump's decision Wednesday to revoke former CIA director John Brennan's security clearance is bad for the country in three ways.

First, this is clearly retaliation for public criticism of the president, and it appears designed to intimidate others who might consider doing the same. Brennan has been a fierce Trump detractor, and now he is being punished. Brennan himself will not be deterred, of course, but the president seems intent on sending a message to millions of current and former government officials that their clearances now depend on good behavior as defined by Trump's personal preferences.

Trump's revocation of the security clearance also has a more pointed effect. Brennan was the CIA director when the U.S. intelligence community made a public assessment that Russian President Vladimir Putin had "ordered an influence campaign in 2016 aimed at the U.S. presidential election" to "help President-elect Trump's election chances when possible by discrediting Secretary [Hillary] Clinton." The following year, special counsel Robert S. Mueller III was appointed to investigate "any links and/or coordination between the Russian government and individuals associated with the campaign of President Donald Trump."

On Wednesday, when asked about revoking Brennan's clearance, Trump said: "I call it the rigged witch hunt . . . So I think it's something that had to be done." Brennan now joins many others who have been involved in the Russia investigation and found themselves attacked or retaliated against by the president.

Trump's use of security clearances, in effect, creates a kind of spoils system to suppress free speech and to influence the investigation of which he is a subject. It is another example of the unprecedented conversion of national security and other governmental powers to serve personal ends.

Second, of course, the president's action will not be defended on those grounds. The administration has already begun the process of dressing it up for court with generic, post-hoc rationales. We should expect to see a rerun of the strategy used to defend the president's travel ban against mostly Muslim visitors to the United States, which appeared to have been conceived in religious animus but was ultimately defended — and upheld — on a more anodyne basis.

If a legal challenge is brought, the president's lawyers will spend down the accumulated credibility of his office as they try to persuade judges that the decision was aboveboard and does not implicate the First Amendment. But Americans will know what is really going on: If you criticize the president, you lose your clearance. Regardless of whether this strategy yields a favorable legal judgment for Trump, it corrodes the rule of law when the government defends a president's actions with profoundly false justifications.

Third, the president's action harms national security. Intelligence agencies rely on outside advisers, often former government officials, to provide advice and assistance on an ad hoc or continuing basis. Those former officials need security clearances to perform this service. Despite the passage of time since Brennan left office, it's not hard to imagine his value in this regard — for example, to help prepare the current CIA director, Gina Haspel, before she speaks with Brennan's old sparring partner, Alexander Bortnikov, the head of Russia's internal security service.

But again, the real significance of the president's decision goes well beyond Brennan. The intelligence community relies on candid advice from former officials, and it undermines that reliance to try to frighten them into political support for the current administration. In this way, and so many others, we all pay the price for the president's relentless attempts to advance his personal agenda.