Once again, Donald Trump has heedlessly jeopardized important institutional interests of the presidency in the service of his own personal pique. For years, courts have declined to review the merits of security clearance determinations, relying on Department of Navy v. Egan, in which the Supreme Court held that the kind of “[p]redictive judgment” embodied in the grant or denial of a clearance “must be made by those with the necessary expertise in protecting classified information,” rather than judges. Even when Congress established protections for intelligence whistleblowers, it provided only for administrative, rather than judicial, review. The Department of Justice and the intelligence community have vigorously, and successfully, defended this executive-branch prerogative.

In revoking former CIA director John Brennan’s security clearance, President Trump has undercut this position. As Judge Gregory Katsas recently noted in a concurring opinion in Palmieri v. United States, “whether a plaintiff can seek to undo the denial or revocation of a security clearance, based on non-frivolous constitutional challenges” has not yet been definitively determined. And it’s hard to imagine a stronger constitutional case than the one the president has just handed advocates of judicial review. So far as is apparent, there was no process at all, let alone due process, or even any consultation with intelligence agencies in stripping Brennan’s clearance. The reasons stated in the president’s memorandum appear pretextual, particularly in light of his subsequent Wall Street Journal interview seemingly acknowledging that his motive was Brennan’s role in the so-called “rigged witch hunt.” That he acted not because Brennan threatened national security but because Brennan criticized him is further shown by the list of others whose clearances have been threatened, who have in common only the president’s perception that they oppose him.

I don’t know whether Brennan intends to challenge the revocation of his clearance in court. There are good reasons not to, including the burdens inherent in litigation and the fact that he likely has little need for the clearance. But if he does, he should have little difficulty persuading a court that his clearance was revoked in retaliation for his exercise of his First Amendment right to criticize the president. That will then squarely present the issue of whether courts are powerless to prevent such abuse of the clearance system—and the result may be that the president’s control over security clearances, long jealously guarded, will have been weakened as a result of one president’s tantrum.