The Republican attacks that accompanied the firing of FBI Director James Comey have sharply intensified in the last two weeks, with broadsides delivered on Twitter, public statements and even from the White House podium.

Comey, who in June said President Donald Trump and the White House had lied about him and the law enforcement agency he led, has been repeatedly accused of delivering false testimony, of prematurely exonerating Hillary Clinton for her use of a private email server and of improperly leaking details about his private conversations with the president.

The attacks, which come as Congress and federal investigators probe the circumstances of his dismissal, appear clearly designed to undercut the credibility of a veteran lawman whose testimony and vivid first-person accounts loom as central to special counsel Robert Mueller’s investigation.

Though Trump’s lawyers over the summer had been mulling ways to undermine the legitimacy of Mueller’s investigation, the stepped-up salvos suggest White House officials and Trump’s legal team see Comey — who, despite enjoying broad support from within the FBI, also received bipartisan criticism for his handling of the Clinton probe — as a more vulnerable target for attack.

Jay Sekulow, one of Trump’s lawyers, told The Associated Press this week that he did not consider Comey to be a “credible witness” and that there were multiple reasons for Comey’s firing.

“I’m not looking at this as a legal strategy. I’m just discussing facts. Read Hillary Clinton’s book,” said Sekulow, referring to the newly released post-mortem of last year’s election that harshly criticizes Comey’s oversight of the email investigation.

But there’s also no question that attempts to sully Comey’s reputation, and to characterize him as a rogue and ineffective leader, are also aimed at undercutting any potential obstruction of justice allegations arising from the May 9 firing and at planting the idea that the dismissal was the culmination of legitimate performance concerns — not an effort to railroad the Russia probe.

“I think there’s a recognition that if there were to be an obstruction case, the credibility of Jim Comey will be a central issue — no different than the credibility of a central, critical witness to any other case,” said Jacob Frenkel, a Washington defense lawyer who has followed the investigation.

“The best time to cast doubt on a witness’ reputation or reliability,” he added, “is before any case actually hits the courtroom or Congress in a charging document.”

The attacks on Comey’s performance aren’t surprising given the White House’s labored, and evolving, efforts to explain the firing.

Officials initially said Trump was acting on the recommendation of his Justice Department, which produced a scathing assessment of his handling of the Clinton investigation. But that explanation unraveled days later when Trump said he would have fired Comey regardless of recommendation, and was further weakened when it was revealed that Trump and an aide had earlier drafted, but not sent, a letter meant to rationalize the planned dismissal. That draft memo is in Mueller’s possession.

The criticism of Comey began immediately after his firing, when White House press secretary Sarah Huckabee Sanders claimed to have personally heard from many unsatisfied FBI agents about low morale at the bureau. But it has escalated in the last two weeks. Sen. Chuck Grassley, the Republican chairman of the Senate Judiciary Committee, released segments of interviews with FBI officials that show Comey had begun contemplating how to close the Clinton email investigation without charges months before Clinton and other key aides had been interviewed by agents.

The following morning, Trump tweeted, “Wow, looks like James Comey exonerated Hillary Clinton long before the investigation was over…and so much more. A rigged system!”

This week, Sanders said she thought Comey should be investigated by the Justice Department for disclosing private memos to the media.

“James Comey’s leaking of information, making questionable statements under oath, politicizing an investigation_those are real reasons for why he was fired,” Sanders said.

Yet no memos were released by Comey. Instead, a friend of Comey shared portions of the notes with reporters and has said none of the material was marked classified. Comey was already gone by the time the existence of the memos was made public, and he has steadfastly denied that politics factored into his decision.

Trump’s own relationship with Comey had been frayed for months. The president has said he was angry when Comey, in a private meeting in January, shared with him details from a dossier of salacious allegations about ties between Russia and the campaign. Comey has said Trump later asked him for a loyalty pledge and to end an investigation into former national security adviser Michael Flynn.

The attacks have been galling to current and former FBI agents who were personally and professionally fond of Comey.

His reputation for independence was sealed by the revelation that, as deputy attorney general during the George W. Bush administration, he had threatened to resign over the renewal of a domestic surveillance program. Though those same tendencies put him at odds with presidential administrations — he publicly broke with the Obama White House on race and policing, and aggravated officials by departing from standard protocol during the Clinton investigation — employee surveys show he maintained abiding support and respect from the FBI’s rank-and-file.

“For us to have to sit through the attacks on his character, his integrity, to see attempts to paint a picture that is completely the opposite of what we knew … it’s very hard to stomach,” said Frank Montoya, a retired FBI supervisor.

But that audience isn’t necessarily who Sanders is trying to win over.

“Those who hold Jim Comey in the highest regard for integrity and performance always will do so regardless of public relations positioning,” Frenkel said. “These efforts have nothing to do with a message to the FBI or a message to the legal community. This is likely about creating a perception for potential jurors should that ever become an issue.”