WASHINGTON — John O. Brennan, the C.I.A. director under President Barack Obama, struck back at President Trump on Thursday for revoking his security clearance, calling the president’s claims of “no collusion” with Russia to influence the 2016 election “hogwash” and arguing that the commander in chief was trying to silence anyone who would dare challenge him.

“Mr. Trump clearly has become more desperate to protect himself and those close to him, which is why he made the politically motivated decision to revoke my security clearance in an attempt to scare into silence others who might dare to challenge him,” Mr. Brennan wrote in an opinion article in The New York Times. He said the move made it more important than ever for Robert S. Mueller III, the special counsel, to complete his investigation of Russia’s election misdeeds without interference from Mr. Trump.

Mr. Trump’s decision to revoke the security clearance drew rebukes Thursday from national security officials and members of both political parties, who called it an extraordinary act of retaliation that reflected authoritarian tactics.

“The fact that the president did this himself leaves him open to the criticism that it looks politically motivated,” Fran Townsend, who served as homeland security adviser in George Bush’s White House, said on CBS. “The notion that you’re going pull somebody’s clearance because you don’t like what they did in government service or you don’t like what they say is deeply disturbing and very offensive.”