Sen. Robert Menendez (D-N.J.) speaks to members of the media in Newark, N.J., on Thursday after a judge declared a mistrial in the bribery case against him. (Peter Foley/Bloomberg)

The trial of Sen. Robert Menendez (D-N.J.) and his co-defendant Salomon Melgen has ended in a mistrial. It’s just the latest instance in which a public corruption prosecution has fizzled, at least so far, leading some to question whether the Supreme Court has made it impossible to go after corrupt politicians. Over the nearly three-month trial, prosecutors presented what appeared to be a compelling case of political favors traded for trips on private jets, luxury vacations and hefty political donations. But in the end, a number of the jurors apparently had a reasonable doubt about the quid pro quo, the linchpin of any corruption case.

The political consequences of the mistrial are substantial. If Menendez had been convicted, there almost certainly would have been a firestorm over whether the Senate should move to expel him immediately to allow New Jersey Gov. Chris Christie, a Republican, to appoint his replacement. But now any potential retrial and conviction will be pushed well beyond January, when New Jersey’s incoming Democratic governor will take office and inherit the appointment power. The chance of Menendez being replaced by a Republican as a result of the trial, which was always slim, is now nonexistent.

The legal consequences are less clear. It’s difficult to generalize too much from a single outcome; corruption often is difficult to prove, and sometimes even a strong case can result in a hung jury. It may be tempting to see this as another casualty of the Supreme Court’s recent decision in the Robert F. McDonnell case, where the court restricted the types of “official acts” that will support a bribery conviction. But although Menendez did seek to rely on McDonnell, this wasn’t really an “official acts” case. Menendez’s actions should have been sufficient to meet the McDonnell standard.

The key issue was not official acts but proof of corrupt intent or quid pro quo. There’s no doubt the jet travel and political donations took place, and no doubt that Menendez interceded on Melgen’s behalf in various matters. But neither of those things is illegal. It only becomes a crime if there is an agreement to exchange one for the other. And there are a few features of the case that undoubtedly contributed to the government’s difficulty in proving that corrupt deal.

The defendants were helped by the fact they are longtime friends. When he was first indicted, Menendez accused prosecutors of not knowing the difference between friendship and corruption. Although, as prosecutors pointed out, friends can certainly commit crimes together, the undisputed, long friendship between the two men gave jurors a possible alternative explanation for both Melgen’s gifts and Menendez’s efforts.

The prosecution was also hampered by the lack of a smoking gun. There was no killer email clearly describing the quid pro quo, no freezer full of illicit cash. And perhaps most significantly, there was no cooperating witness.

Often the best way to prove a corrupt deal is to have one of the parties to that deal testify about it. In the McDonnell case, for example, the man accused of bribing the former Virginia governor was granted immunity and testified for several days as the government’s star witness. With the benefit of testimony from one party to the corrupt agreement, the jury readily found McDonnell guilty.

In this case the government likely was hoping that Melgen would agree to cut a deal and cooperate by testifying against Menendez. The pressure on Melgen to do so was intense, particularly after he was convicted in a separate Medicare fraud case in Florida in the spring. But Melgen stayed mum. Without his testimony, the government was forced to rely on a timeline of gifts and official acts to ask the jury to infer a corrupt deal. That’s a more difficult task and one that leaves plenty of room for the defense to inject reasonable doubt.

A series of Supreme Court decisions over the past two decades has made prosecuting public corruption more difficult. The court has tightened up the requirements for bribery and has cut back on more expansive corruption theories such as “honest services fraud.” But the reality is that corruption cases have always been challenging because proving corrupt intent requires proving what was going on in someone’s mind. That hurdle becomes even higher when prosecutors are trying to prove intent largely through circumstantial evidence, as in this case.

Prosecutors now have to decide whether they will retry the case. They will take into account any information they can glean from the jurors and reevaluate their position and perhaps their presentation. Typically, prosecutors will try at least one more time if their fundamental belief in the case has not been shaken. Yet as Thursday’s mistrial shows, while things can look sleazy and fail to pass the smell test, it can still be difficult to convince a unanimous jury beyond a reasonable doubt that conduct crossed the line from merely sleazy to criminal.