Former CIA director John Brennan testifies before the House Intelligence Committee on “Russian active measures during the 2016 election campaign” in the U.S. Capitol in Washington, May 23, 2017.

President Donald Trump has withdrawn ex-CIA Director John Brennan's security clearance, in a move hitting one of the administration's most vocal critics.

The action, announced Wednesday by press secretary Sarah Huckabee Sanders, appears to be more of a political than practical move. Brennan and most other prominent former White House officials do not use their clearances to consult with the Trump administration, and the move may not prevent them from speaking out publicly now.

In justifying pulling Brennan's clearance, Sanders read a statement from Trump claiming that the former spy chief has shown "erratic conduct and behavior" and "has a history that calls into question his objectivity and credibility." She said the move was about "protecting classified information," though she did not provide any examples of Brennan using his access to improperly leverage sensitive information since he left the CIA post. Sanders denied the move was political.

"Mr. Brennan's lying and recent conduct characterized by increasingly frenzied commentary is wholly inconsistent with access to the nation's most closely held secrets and facilities," the president said in the statement read by Sanders.

Sanders said the White House will also consider whether to revoke security clearances of other former and current high-ranking law enforcement and intelligence officials — all of whom have earned Trump's ire in some way. Those are: former FBI Director James Comey, former Director of National Intelligence James Clapper, ex-NSA Director Michael Hayden, former national security advisor Susan Rice, former Deputy Attorney General Sally Yates, ex-Deputy FBI Director Andrew McCabe, former FBI agent Peter Strzok, ex-FBI lawyer Lisa Page and Justice Department official Bruce Ohr.

In response, Brennan called the action "part of a broader effort by Mr. Trump to suppress freedom of speech" and "punish critics." He signaled that it would not stop him from criticizing the president.

"It should gravely worry all Americans, including intelligence professionals, about the cost of speaking out. My principles are worth far more than clearances. I will not relent," Brennan tweeted on Wednesday.

Brennan tweet

He also told MSNBC that Trump is "trying to get back at" him with a move he called "politically motivated." Brennan said he did not find out about his clearance getting revoked until after Sanders' briefing on Wednesday and has not heard from a government official since.

The announcement at least temporarily puts more scrutiny on Trump's political opponents rather than the president himself. It comes amid repeated questions about nondisclosure agreements signed by former Trump campaign staffers brought about by accusations of racism and instability on Trump's part from ex-administration official Omarosa Manigault Newman.

Former top-ranking officials have frequently in the past kept their security clearances so that the White House can consult with them on important topics.

Brennan has frequently and pointedly criticized Trump since the president took office in January 2017. In a tweet on Tuesday responding to the president calling Manigault Newman a "dog," Brennan wrote that "it's astounding how often [Trump fails] to live up to minimum standards of decency, civility & probity."

"Seems like you will never understand what it means to be president, nor what it takes to be a good, decent, & honest person. So disheartening, so dangerous for our Nation," he wrote about the president.

Brennan tweet

On Tuesday night, he told MSNBC that "I think Donald Trump has badly sullied the reputation of the office of the presidency."

In pulling Brennan's clearance, the White House questioned his credibility in denying to Congress that the CIA "improperly accessed the computer files of congressional staffers." Trump's statement also claimed that Brennan showed inconsistency in telling Congress that the intelligence community did not use the so-called Steele dossier as part of its conclusion that Russia tried to interfere in the 2016 election.

Ohr is the only one of the people Sanders named at risk of losing a security clearance who currently works in the Trump administration. The Department of Justice declined to comment on the evaluation of his clearance.

Last month, House Speaker Paul Ryan said that the president was "trolling people" with threats to pull their security clearances and noted that the decision about whether to do so falls under the executive branch's purview. Ryan's office declined to comment to CNBC.

Brennan had no immediate comment. The former CIA director who served during the Obama administration is a contributor to NBC News.

Director of National Intelligence Dan Coats and some other intelligence officials were not told in advance about pulling Brennan's clearance, an official familiar with the decision told NBC News.

Other ex-intelligence and law enforcement officials criticized the move on Wednesday. Former Deputy CIA Director John McLaughlin called the security clearance removal "ridiculous." He told MSNBC that he doubts "anyone in the White House has thought through" the action.

Clapper told CNN that "the larger issue here ... has been in infringement on First Amendment rights." All of the people Sanders named have "either been outspoken about the administration, or have directly run afoul of it. And taken actions that were inimical to President Trump's interests."

Mark Warner, the Virginia senator and top-ranking Democrat on the chamber's intelligence committee, said, "This might be a way to distract attention, say from a damaging news story or two." But "politicizing the way we guard our nation's secrets just to punish the President's critics is a dangerous precedent," he said in a tweeted statement.

Warner tweet