FBI Director James Comey said on July 5 that Hillary Clinton should not be charged for her use of a private email server during her time as secretary of state. Here's what he said, in three minutes. (Peter Stevenson/The Washington Post)

In the wake of FBI Director James B. Comey’s decision not to recommend charges against Hillary Clinton, presumptive Republican presidential nominee Donald Trump again compared the matter to the criminal case against former CIA director David Petraeus and suggested that Petraeus, unlike Clinton, did not get a fair shake.

“The system is rigged,” Trump tweeted Tuesday. “General Petraeus got in trouble for far less. Very very unfair! As usual, bad judgment.”

The way the FBI and prosecutors see it, though, the Petraeus case and others involving classified information had aggravating circumstances that separated them from Clinton’s. In other cases, investigators believed that those whom they were targeting lied, or that their handling of classified information was meant to achieve some personal end.

In Clinton’s case, they found no evidence of that, the FBI director said.

“In looking back at our investigations into mishandling or removal of classified information, we cannot find a case that would support bringing criminal charges on these facts,” Comey said. “All the cases prosecuted involved some combination of clearly intentional and willful mishandling of classified information; or vast quantities of information exposed in such a way as to support an inference of intentional misconduct; or indications of disloyalty to the United States; or efforts to obstruct justice. We do not see those things here.”

The Obama administration has prosecuted more leakers than all of its predecessors combined, and the FBI director’s recommendation that prosecutors pass on doing so for Clinton has already sparked criticism about a double standard. Rudy Giuliani, the former New York mayor who years ago worked as Comey’s boss while serving as a U.S. attorney, said in an interview that he was “disappointed in the reasoning” of the decision, particularly on the question of Clinton’s intent.

“I believe that she was held to a standard that no one else would be held to,” Giuliani said. “I’m certain in my heart of hearts that if I did that, I would have been indicted six months ago.”

House Judiciary Committee Chairman Bob Goodlatte (R-Va.) wrote a letter to Comey noting that five people — John Kiriakou, Shamai Leibowitz, Chelsea Manning, Jeffrey Sterling and Stephen Kim — were prosecuted under the Espionage Act during the Obama administration and sentenced to prison terms. Goodlatte also asked, among a number of other questions, how Clinton’s case differed from that of Petraeus.

In the Petraeus case, authorities initially contemplated felony charges of lying to the FBI and violating a section of the Espionage Act, though the storied general ultimately pleaded guilty to a misdemeanor charge of mishandling classified material. He was accused of giving classified information to his mistress and biographer, Paula Broadwell.

Some worried at the time that the case could hamper similar efforts to secure prison terms in leak cases, and that undoubtedly shaped prosecutors’ thinking on the Clinton investigation. But Petraeus had some key differences — perhaps most notably, he denied ever giving classified information to Broadwell, and investigators would later come to believe he had lied to them in asserting that.

In the Sterling case, prosecutors accused the former CIA officer of having bad motives in leaking information to a New York Times reporter that shut down a highly classified program meant to stop Iran from procuring a nuclear weapon. Prosecutors alleged — and jurors apparently agreed, though Sterling has asserted his innocence — that Sterling gave information to the reporter to get back at the agency, with which he was feuding in court.

Prosecutors alleged a similar bad motive in the case of Kiriakou: By their telling, the former CIA officer wanted to raise his profile so he could get consulting work and sell a book, so he leaked classified information, including the name of a CIA operative involved in the agency’s controversial interrogation methods.

Bryan H. Nishimura, a Navy reservist deployed to Afghanistan in 2007 and 2008, pleaded guilty last year to unauthorized removal and retention of classified materials in a case that, in some ways, parallels Clinton’s because he downloaded and stored classified information to personal devices. Investigators did not find evidence that Nishimura intended to distribute classified material to unauthorized personnel, though he did admit destroying a large quantity of classified information he had kept in his home after a conversation with Navy personnel about the matter.

Democratic presidential candidate Hillary Clinton was cleared of wrongdoing by the FBI into her email practices while at the State Department. Republican foe Donald Trump took aim at Clinton at a rally July 5. Here's what he said. (Victoria Walker/The Washington Post)

Clinton’s case, of course, does not have any exact parallels, and Comey offered no motive for her use of a private email server. He said investigators “did not find clear evidence that Secretary Clinton or her colleagues intended to violate laws governing the handling of classified information,” though he said they were “extremely careless in their handling of very sensitive, highly classified information.”

That will provide fodder for her critics on the campaign trail, though Comey said it did not lead him to believe he should recommend charging her with a crime.

Robert Costa contributed to this report.