When President Donald Trump fired James Comey in May, he said he was acting on the recommendation of Justice Department leaders who had faulted the FBI director for publicly releasing "derogatory information" about Hillary Clinton at the conclusion of the email server investigation one year earlier.

Yet with each tweet about the Clinton probe, Trump seems to be further undermining his administration's stated rationale for a termination that's now central to special counsel Robert Mueller's Russia investigation.

The disconnect between Trump's attacks on Comey's handling of the email investigation and the criticism of Comey by his own Justice Department could muddy the narrative about exactly why Comey was fired. This may complicate efforts by the president's legal team to present a coherent narrative as Mueller and his prosecutors examine whether the dismissal could support obstruction of justice allegations.

Get Breaking News Delivered to Your Inbox

Trump has complained for months about the FBI's decision not to pursue criminal charges against Clinton, his Democratic opponent in the 2016 presidential election, for her use of a personal email server. He has suggested the criminal investigation was rigged in her favor, claiming in one October tweet that Comey "totally protected" her. In the last few weeks alone, he seized on the revelation of politically charged text messages from an FBI agent who worked on that probe to again deride the investigation and, in a Saturday tweet that appeared to suggest Clinton should have been prosecuted, he referred to "33,000 illegally deleted emails."

Yet those attacks are increasingly hard to square with a Justice Department memo that the White House in May held up as justification for firing Comey. That memo, authored by Deputy Attorney General Rod Rosenstein, cites an unusual July 2016 news conference in which Comey described Clinton and her aides as "extremely careless" as well as notification to Congress, days before the election, that the investigation was being revisited because of the sudden discovery of additional emails.

"From the beginning there's always been serious doubt that the memo from the deputy attorney general was the actual reason the president fired the FBI director," said Scott Fredericksen, a Washington criminal defense lawyer and former federal prosecutor. "These tweets," he added, "probably don't help the president in that regard."

A lawyer for Trump did not return a phone message seeking comment.

Mueller's team has been keenly interested for months in the circumstances of Comey's firing, with prosecutors obtaining an initial White House memo, drafted but never released, that purported to lay out a basis for Comey's removal.

The final memo that the White House released on May 9, signed by Rosenstein, castigated Comey for announcing that criminal charges were not warranted against Clinton even though such determinations are generally left to Justice Department prosecutors. He also faulted Comey for comments made during that news conference, which he said broke with Justice Department protocol by issuing "derogatory information" about someone who was not charged. Though he did not explicitly say it, his assessment seemed in line with that of Clinton and her supporters — that Comey's statements and actions during the investigation had harmed her election prospects.

"The Director laid out his version of the facts for the news media as if it were a closing argument, but without a trial," Rosenstein wrote. "It is a textbook example of what federal prosecutors and agents are taught not to do."

In a single-page letter to Comey released alongside Rosenstein's memo, Trump said he was accepting the Justice Department's recommendation to fire him.

From the start, though, that explanation has been tough to reconcile with Trump's blistering attacks on Clinton, and his constant assertions on the campaign trail and as president that she should have been prosecuted. He returned to that theme days after Mueller revealed a plea deal with Michael Flynn, Trump's former national security adviser, when he tweeted: "Many people in our Country are asking what the 'Justice' Department is going to do about the fact that totally Crooked Hillary, AFTER receiving a subpoena from the United States Congress, deleted and 'acid washed' 33,000 Emails? No justice!"

On Saturday, amid reports that FBI Deputy Director Andrew McCabe — a frequent Trump target — was retiring soon, the president tweeted, "How can FBI Deputy Director Andrew McCabe, the man in charge, along with leakin' James Comey, of the Phony Hillary Clinton investigation (including her 33,000 illegally deleted emails) be given $700,000 for wife's campaign by Clinton Puppets during investigation?"

"The irony is most politicians would recognize that perpetuating silence post-firing would have been the most effective course," said Jacob Frenkel, a Washington defense lawyer and former prosecutor.

In the event charges are brought or impeachment proceedings are begun, that kind of inconsistent messaging would present "not just entertaining fodder for cross-examination" but also material that could be used to challenge a witness's credibility, Frenkel said.

But by the same token, the evolving messaging could oddly benefit Trump by making it difficult to attach any one motive or reason — such as a desire to shut down the Russia investigation — for Comey's firing.

"Once you start picking on one tweet or one message, then it becomes, 'What about this tweet or that message?' You're constantly having competing messages," Frenkel said.