WASHINGTON (AP) — President Donald Trump declared Thursday that he didn't fire FBI Director James Comey over the Russia investigation, despite previously citing that as the reason. His lawyer, meanwhile, blasted federal investigators as "a lynching mob" the Trump team will "knock the heck out of" in the end.

The president has said at least twice that Comey's firing in May 2017 was related to the FBI's investigation into whether Trump's campaign associates coordinated with Russia in an effort to sway the 2016 election. And his lawyer, Rudy Giuliani, told Fox News earlier this month that Trump fired Comey because the FBI director wouldn't publicly state that he "wasn't a target" of the Russia investigation.

Trump tweeted Thursday: "Not that it matters but I never fired James Comey because of Russia! The Corrupt Mainstream Media loves to keep pushing that narrative, but they know it is not true!"

Comey's firing led to the appointment of Robert Mueller as the Justice Department's special counsel investigating Russian meddling in the 2016 election as well as possible ties between Trump's presidential campaign and Russia. The firing is now under investigation by Mueller for possible obstruction of justice.

On Wednesday night, Giuliani said on Fox News' "Hannity" that the investigation "never should have taken place in the first place" and claimed there were ethical issues within the Justice Department.

"So, you got a group there, a lynching mob, so let them do their job and, boy, we're ready to knock the heck out of you with our report, which will be authoritative," Giuliani said. "It will be backed up. It will be backed up with law and facts. And we'll let the American people decide this."

It was not immediately clear what report Giuliani was referring to.

Trump's legal team has said that Mueller is working on a report addressing whether the president obstructed justice. The Justice Department inspector general is also preparing a report that is expected to criticize the FBI's handling of the investigation into Democrat Hillary Clinton's use of a private email server while she was secretary of state.

Giuliani's "lynching mob" comment drew criticism from Republican Sen. Mike Lee of Utah, who told CNN, "That's pretty strong language." Lee said that "based on what I know now, those are not words that I would use to describe this. This is an investigation."

In announcing Comey's firing in 2017, the White House initially cited his handling of the Clinton email investigation, seizing on the FBI director's decision to divulge details of the probe to the public during her campaign against Trump.

A few days after Comey was dismissed, Trump told NBC's Lester Holt that he was thinking of "this Russia thing" when he fired Comey.

And The New York Times reported Trump told Russian diplomats in the Oval Office in May 2017 that Comey's dismissal had removed some of the pressure he faced over the Russia investigation.

"I just fired the head of the FBI. He was crazy, a real nut job," Trump said during the May 10 meeting, according to the newspaper. "I faced great pressure because of Russia. That's taken off."

Earlier this month, Giuliani told Fox News that Trump felt he was treated worse by the FBI than Clinton, who was publicly cleared of criminal wrongdoing at an unusual FBI headquarters news conference in July 2016.

"He fired Comey because Comey would not, among other things, say that he wasn't a target of the investigation," Giuliani said. "He's entitled to that. Hillary Clinton got that. Actually, he couldn't get that."

Associated Press writer Chad Day contributed to this report.