WASHINGTON — President Donald Trump is examining whether to revoke the security clearances of former intelligence officials who have criticized him, his spokeswoman said Monday, raising the specter of a president using his office to lash out at his political critics.

White House press secretary Sarah Huckabee Sanders told reporters that Trump is considering yanking the security clearances of former CIA Director John Brennan, an NBC News contributor; former FBI Director James B. Comey; former CIA Director Michael V. Hayden; former National Security Adviser Susan E. Rice; former Director of National Intelligence James R. Clapper Jr.; and former FBI Deputy Director Andrew McCabe.

Sanders accused those former officials, most of whom have served both Democratic and Republican presidents in various jobs, of having "politicized and in some cases monetized their public service." She added that they have made "baseless claims" about the president's relationship and contacts with the Russian government.

"I don't go back for classified briefings (although they occasionally ask me in to offer a view on something)," Hayden told NBC News. "Won't have any impact on what I say or write."

But, he added, the move "could create a chill that would be bad for policy development."

Classification expert Steven Aftergood of the Project on Government Security said he was not aware of a previous case in which a president moved to revoke the clearances of officials from a previous administration, "especially those who had expressed criticism of his actions."

Former National Intelligence Director James Clapper testifies on Capitol Hill on May 8. Pablo Martinez Monsivais / AP

He also said that presidents are not normally involved in decisions about granting or revoking specific security clearances.

"It certainly has shadows of some of the worst abuses of the Nixon administration," said Stephen Vladeck, a law professor and national security expert at the University of Texas School of Law who describes himself as a progressive. "This sort of screams political retribution. This is punitive, this is not security based."

Vladeck, a frequent contributor to NBC News' opinion section, THINK, said Trump can probably override federal regulations and take action himself to remove a person’s security clearance.

Clapper told CNN that his security clearance "has nothing to do with how I or any of us feel about the president. And I don't get the briefings. I don't have access to classified information. It's frankly more of a courtesy that former senior officials in the intelligence community are extended the courtesy of keeping the security clearance. Haven't had a case to use it and has no bearing whatsoever on my regard or lack thereof for President Trump or what he's doing."

Former FBI director James Comey speaks during the Canada 2020 Conference in Ottawa on June 5, 2018. Justin Tang / The Canadian Press via AP file

He added, "I think this is just a very, very petty thing to do. And that's about all I'll say about it."

Brennan and Rice did not have an immediate comment. But Nick Shapiro, a former CIA deputy chief of staff and adviser to John Brennan released and tweeted a statement saying, "One doesn't need a security clearance to speak out against the failings of Trump. This is a political attack on career national security officials who have honorably served their country for decades under both Repubs & Dems in an effort to distract from Mueller's investigation."

Comey and McCabe no longer have clearances, a spokeswoman for them said.

The heads of intelligence agencies typically retain their security clearances unless there is reason to revoke them. There is a public policy reason for that.

It allows them to speak about sensitive matters with their successors, or to Congress. There are some operations or intelligence known to only a small number of people at an agency, including the director.

Michael Flynn, who headed the defense intelligence agency, had a clearance when he was shouting "Lock Her Up" at the Republican National Convention in 2016. He has since lost it, having pleaded guilty to a felony.

Security clearances are also valuable, financially, in the private sector — meaning the president's threat included a potential financial penalty against these people, as well as the other negative consequences losing a clearance would bring.

Mark Zaid, a Washington, D.C., lawyer who represents intelligence officials in security clearance disputes, said the president has the absolute authority over who gets to see classified information.

"That said, I’m not aware of any president ever involving themselves in a favorable or unfavorable security clearance decision."

"It’s an incredibly scary thought that a president would ever even consider engaging in this type of conduct," Zaid said. "Such an act would completely undermine the national security establishment that has been created over the last 75 years."