WASHINGTON — Former U.S. security officials issued scathing rebukes to President Donald Trump on Thursday, admonishing him for yanking a top former spy chief’s security clearance in what they cast as an act of political vengeance. Trump said he’d had to do “something” about the “rigged” federal probe of Russian election interference.

Trump’s admission that he acted out of frustration about the Russia probe underscored his willingness to use his executive power to fight back against an investigation he sees as a threat to his presidency. Legal experts said the dispute may add to the evidence being reviewed by special counsel Robert Mueller.

In an opinion piece in The New York Times, former CIA Director John Brennan said Trump’s decision, announced Wednesday, to deny him access to classified information was a desperate attempt to end Mueller’s investigation. Brennan, who served under President Barack Obama and has become a vocal Trump critic, called Trump’s claims that he did not collude with Russia “hogwash.”

The only question remaining is whether the collusion amounts to a “constituted criminally liable conspiracy,” Brennan wrote.

Later Thursday, the retired Navy admiral who oversaw the raid that killed Osama bin Laden called Trump’s moves “McCarthy-era tactics.” Writing in The Washington Post, William H. McRaven said he would “consider it an honor” if Trump would revoke his clearance, as well.

“Through your actions, you have embarrassed us in the eyes of our children, humiliated us on the world stage and, worst of all, divided us as a nation,” McRaven wrote.

That was followed late Thursday by a joint letter from 12 former senior intelligence officials calling Trump’s action “ill-considered and unprecedented.” They said it “has nothing to do with who should and should not hold security clearances — and everything to do with an attempt to stifle free speech.”

The signees included six former CIA directors, five former deputy directors and former Director of National Intelligence James Clapper. Two of the signees — Clapper and former CIA Director Michael Hayden — have appeared on a White House list of people who may also have their security clearances revoked.

Trump on Wednesday openly tied his decision to strip Brennan of his clearance — and threaten nearly a dozen other former and current officials — to the ongoing investigation into Russian election meddling and possible collusion with his campaign. In an interview with The Wall Street Journal, Trump again called the probe a “rigged witch hunt” and said “these people led it!”

“So I think it’s something that had to be done,” he said.

The president’s comments were a swift departure from the official explanation given by the White House earlier Wednesday that cited the “the risks” posed by Brennan’s alleged “erratic conduct and behavior.” It marked the latest example of the president contradicting a story his aides had put forward to explain his motivations.

Attorneys said the revocation appeared to be within the president’s authority. But they noted the power play also could be used to reinforce a case alleging obstruction of justice, following the president’s firing of former FBI Director James Comey and his repeated tweets calling for the investigation to end.

Patrick Cotter, a former assistant U.S. Attorney in the Eastern District of New York and a longtime white-collar defense attorney, said that while a prosecutor could argue that Trump’s targeting of clearances was intended as a warning that “if you contribute to, participate in, support the Russia probe and I find out about it, I’m going to punish you,” it is likely not obstruction in itself.

But, he said the move would be a “powerful piece of evidence” for prosecutors as part of a pattern to demonstrate an intent to use presidential power in connection with the probe.

Renato Mariotti, a former federal prosecutor agreed.

“What it shows is that the president is fixated on the Russia investigation, he’s angry about it, and he wants to do everything he can to discourage or slow down the investigation,” he said.

Special Counsel Mueller and his team have been looking at Trump’s public statements and tweets as they investigate whether the president could be guilty of obstruction.

“I don’t think it advances the criminal obstruction case, but I think it’s factually relevant,” said Mark Zaid, a national security attorney. “I think it shows the state of mind and intent to interfere or impede any unfavorable discussion of his potential connection to Russia.”

Former CIA directors and other top national security officials are typically allowed to keep their clearances, at least for some period. But Trump said Wednesday he is reviewing the clearances of several other former top intelligence and law enforcement officials, including former FBI Director Comey and current senior Justice Department official Bruce Ohr. All are critics of the president or are people who Trump appears to believe are against him.

The initial White House statement about Brennan’s clearance made no reference to the Russia investigation. Instead, the president said he was fulfilling his “constitutional responsibility to protect the nation’s classified information,” even though he made no suggestion that Brennan was improperly exposing the nation’s secrets.

“Mr. Brennan’s lying and recent conduct characterized by increasingly frenzied commentary is wholly inconsistent with access to the nations’ most closely held secrets,” Trump said.

Just hours later, his explanation had changed.

“You look at any of them and you see the things they’ve done,” Trump told the Journal. “In some cases, they’ve lied before Congress. The Hillary Clinton whole investigation was a total sham.”

“I don’t trust many of those people on that list,” he said. “I think that they’re very duplicitous. I think they’re not good people.”

The episode was reminiscent of Trump’s shifting explanations for firing Comey and the evolving descriptions of the Trump Tower meeting between top campaign aides and a Kremlin-connected lawyer — both topics of interest to Mueller.

And it underscores why the president’s lawyers are fearful of allowing Trump to sit down for an interview with Mueller’s team, as Trump has repeatedly said he is interested in doing.

In announcing Comey’s firing, the White House initially cited the former FBI director’s handling of the probe into Democratic rival Clinton’s emails, seizing on the FBI director’s decision to divulge details of the probe to the public during her campaign against Trump.

But a few days after Comey was dismissed, Trump told NBC’s Lester Holt in an interview that he was really thinking of “this Russia thing” when he fired Comey.

Trump later changed again, tweeting that he “never fired James Comey because of Russia!”

Early this month, he admitted in a tweet that the Trump Tower meeting, which was arranged by his son, Donald Trump Jr., “was a meeting to get information on an opponent.”

That directly contradicted a July 2017 statement from Trump Jr. — written with the consultation of the White House — that claimed the meeting had been primarily about adoption.

___

Associated Press writer Jessica Gresko contributed to this report.