President Donald Trump indicated in an interview with The Wall Street Journal on Wednesday that he was motivated to revoke former CIA Director John Brennan's security clearance in part because of the ongoing Russia investigation.

In its announcement earlier Wednesday about Brennan's security-clearance revocation, the White House said it was Brennan's "erratic conduct and behavior" and "frenzied commentary" that prompted the action.

"I call it the rigged witch hunt, [it] is a sham. And these people led it," the president told The Journal, adding that the revocation was "something that had to be done."

President Donald Trump made clear in an interview with The Wall Street Journal on Wednesday night that he was motivated to revoke former CIA Director John Brennan's security clearance in part because of the ongoing Russia investigation.

"I call it the rigged witch hunt, [it] was a sham. And these people led it," Trump told The Journal. Brennan and a handful of other US intelligence veterans whose security clearances Trump says he is reviewing played a role in the early days of the investigation into Russia's interference in the 2016 US election.

Trump added that revoking Brennan's security clearance was "something that had to be done."

The president's remarks seemed to contradict a statement from the White House hours earlier about the revocation that cited Brennan's frequent criticism of Trump, "erratic conduct and behavior," "frenzied commentary," and transgressions stretching back to 2014.

The revocation prompted bipartisan rebukes and worries that Trump was willfully infringing on his critics' First Amendment rights.

Trump's assertion to The Journal's Peter Nicholas and Michael C. Bender on Wednesday night resembles a similar one Trump made to NBC News' Lester Holt in May 2017, days after firing James Comey as FBI director.

"In fact, when I decided to just do it, I said to myself, I said, 'You know, this Russia thing with Trump and Russia is a made-up story — it's an excuse by the Democrats for having lost an election that they should've won,'" Trump said at the time. He has expressed that sentiment many more times since that interview.

Documents from the Department of Justice submitted with Comey's dismissal letter cited his handling of the investigation into Hillary Clinton's use of a private email server as secretary of state as the reason for his firing and said nothing of the Russia probe.

While Trump has never been shy about his disdain for the Russia investigation, his escalating attacks on it have triggered worries that he may try to shut it down completely.