Former FBI director James B. Comey appears before the Senate Intelligence Committee in June. (Matt McClain/The Washington Post)

President Trump on Friday accused James B. Comey, the FBI director he abruptly fired in May, of exonerating Hillary Clinton before his agency’s probe into her private email server was complete, taking to Twitter to charge that there is a “rigged system.”

“Wow, looks like James Comey exonerated Hillary Clinton long before the investigation was over … and so much more,” Trump wrote in a morning tweet Friday. “A rigged system!”

Trump seemed to be referring to a letter Sens. Lindsey O. Graham (R-S.C.) and Charles E. Grassley (R-Iowa), both members of the Senate Judiciary Committee, sent to FBI Director Christopher A. Wray on Wednesday. In their letter, the senators wrote that they had recently reviewed transcripts from interviews the Office of Special Counsel conducted last fall with FBI officials as part of its inquiry into Comey’s handling of the Clinton investigation. The Office of Special Counsel is not associated with Robert S. Mueller III, the special counsel investigating Russian interference in the 2016 election, but an independent agency that investigates violations involving federal employees.

The examination of Comey’s work, which was closed after he was ousted from his job, began after people voiced complaints about the then-FBI director’s decision to reveal in late October the Clinton email probe had resumed.

Who’s who in the government’s investigation into Russia ties

Because of redactions, the transcripts are somewhat murky. But they seem to show Comey’s chief of staff, Jim Rybicki, and the principal deputy general counsel of national security and cyberlaw, Trisha Anderson, confirming that Comey first contemplated a statement about closing the Clinton case in April or May of 2016.

That was before agents had interviewed Clinton and others. Comey ultimately delivered a statement indicating he was recommending the case be closed without charges — but also lambasting Clinton and her aides for their carelessness in handling classified information — days after Clinton was interviewed in early July 2016.

It is not improper or unusual for investigators and prosecutors to begin discussing how to announce the resolution of a case before it is done, particularly when an investigation has stretched for many months and its conclusion is beginning to become clear. Doing so is typically a sign of preparation.

The Clinton investigation began in July 2015.

Grassley and Graham, though, suggested in their letter that discussion of Comey’s statement before the investigation was completed was improper.

“Conclusion first, fact-gathering second — that’s no way to run an investigation,” the senators wrote. “The FBI should be held to a higher standard than that, especially in a matter of such great public interest and controversy.”

Daniel Richman, a lawyer for Comey, declined to comment, as did the FBI. Anderson declined to comment, and Rybicki could not immediately be reached.

The turmoil surrounding former FBI Director James Comey and President Trump started long before Comey was fired on May 9. Here are the pivotal moments from Comey's time as head of the agency, including his private meetings with the president. (Jenny Starrs,Julio Negron/The Washington Post)

That the FBI was leaning against charges for Clinton or her aides before interviewing Clinton herself is not completely new, though the materials Grassley released offer glimpses into the behind-the-scenes discussions. The Washington Post had reported in May 2016 — before Clinton and others had talked to the FBI — the investigation had so far found “scant evidence” Clinton intended to break classification rules, though agents were still probing the case.

The New York Times also reported after the case had concluded that nine months into the probe, it “became clear to Mr. Comey that Mrs. Clinton was almost certainly not going to face charges.” The Times reported that Comey then began working on talking points.

No matter when a statement is drafted, it is unusual for the FBI — rather than Justice Department prosecutors — to reveal the end of a case. The FBI often recommends to prosecutors whether agents believe someone should be charged, but it is typically prosecutors who make the ultimate decision and reveal that decision publicly.

Comey’s statement, too, also offered criticism of Clinton. That is abnormal — and many lawyers have said improper — given that Clinton was not charged with a crime and thus had no opportunity to defend herself in court.

Comey has said publicly he was moved to make the public statement in part because, not long before he did, then-Attorney General Loretta E. Lynch met with former president Bill Clinton, Hillary Clinton’s husband, aboard her plane at an airport in Phoenix in late June. Comey told the Senate Intelligence Committee earlier this year the airport meeting was “the thing that capped it for me that I had to do something separately to protect the credibility of the investigation.”

The transcripts that Grassley released somewhat call that into question, as Comey had apparently been contemplating his public statement a month before the tarmac meeting occurred.