President Trump revoked the security clearance of John O. Brennan, the former C.I.A. director under President Barack Obama, on Wednesday, citing his “erratic” behavior and “increasingly frenzied commentary.”

It was an act of retaliation that alarmed members of the intelligence and spy community and a potential threat of using presidential power against anyone connected to the Russia investigation. Mr. Brennan, in an opinion article in The New York Times, said the decision was politically motivated and an “attempt to scare into silence others who might dare to challenge him.”

The president has indicated that he might revoke the clearances of other officials — including a career employee at the Justice Department, Bruce Ohr — in response to their criticism or perceived opposition.