President Trump on Friday slammed what he called a “rigged system” following reports that former FBI Director James Comey began drafting an “exoneration statement” for Hillary Clinton before interviewing her in connection with her private email use as secretary of state.

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

The president was referring to allegations made this week by Senate Judiciary Committee Chairman Chuck Grassley, R-Iowa, and Sen. Lindsey Graham, R-S.C.

In a news release Thursday, the senators said Comey began drafting the exoneration statement in April or May 2016, which was before the FBI interviewed 17 key witnesses, including Clinton herself and other top aides.

COMEY BEGAN DRAFTING 'EXONERATION STATEMENT' BEFORE INTERVIEWING KEY WITNESSES, SENATORS SAY

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

Grassley and Graham said they learned about the draft after reviewing transcripts of interviews with top Comey aides.

“According to the unredacted portions of the transcripts, it appears that in April or early May of 2016, Mr. Comey had already decided he would issue a statement exonerating Secretary Clinton,” the senators said.

They added, “That was long before FBI agents finished their work. Mr. Comey even circulated an early draft statement to select members of senior FBI leadership. The outcome of an investigation should not be prejudged while FBI agents are still hard at work trying to gather the facts.”

Clinton, the Democratic presidential nominee in 2016, was investigated by the FBI for using a private email address and server to handle classified information while serving as secretary of state.

In July 2016, Comey famously called Clinton’s email arrangement “extremely careless” though he decided against recommending criminal charges.

The transcripts in question were from interviews conducted by the Office of Special Counsel, which interviewed James Rybicki, Comey’s chief of staff, and Trisha Anderson, the principal deputy general counsel of national security and cyberlaw, the senators said.

“It is unclear whether the FBI agents actually investigating the case were aware that Mr. Comey had already decided on the investigation’s outcome while their work was ongoing,” the senators wrote.

In the Wednesday letter to FBI Director Chris Wray, the two senators said they have requested all records relating to the drafting of the statement.

Comey was fired as FBI director by Trump in May amid tensions over the Russia investigation.

Fox News' Jason Donner contributed to this report.