For a few days earlier this month, it looked like the years-long corruption probe targeting New Jersey Senator Bob Menendez would fall apart seven weeks into his trial. At issue was the prosecution’s “stream of benefits” theory, which argues that the steady flow of donations and gifts from a wealthy Florida doctor to the Democratic senator—and the flow of favors from the senator to the doctor—amounted to quid pro quo corruption.

During a hearing last week, Judge William Walls seemed to signal that argument was dead on arrival by citing a recent Supreme Court ruling that has vexed public-corruption investigators across the country. “I frankly don’t think McDonnell will allow that,” Walls told prosecutors, referring to the decision in McDonnell v. United States that fundamentally changed the standard for bribery.

Walls eventually decided to let the case proceed, declining to throw out most of Menendez’s charges. But the close call underscores the continuing fallout from McDonnell last year. That ruling, like a series of others from the Court in recent years, recast actions once eschewed in politics as reasonable behavior for elected officials. The justices have portrayed these rulings as necessary on First Amendment grounds. But the long-term effects could imperil the public’s faith in democratic institutions.

“There’s a way in which a lot of the Supreme Court decisions have been ever narrowing what corruption means,” Tara Malloy, a staff lawyer at the Campaign Legal Center, told me. “And McDonnell is one further example of it.”

The case narrowed what could be defined as an “official act” under federal corruption statutes—the quo of a quid pro quo, so to speak. Since McDonnell, it only applies to direct exercises of a government official’s power, like voting for legislation or signing an order. More seemingly mundane activities, like urging other officials to intervene in someone’s favor or setting up meetings for donors, do not qualify.

Before the decision, federal prosecutors brought cases against Democrats and Republicans alike by arguing that “official act” applied to all sorts of actions taken by public officials. Former Virginia Governor Bob McDonnell, a Republican, was convicted in 2015 after taking more than $175,000 in luxury gifts, personal loans, and more from Johnnie Williams, a Virginia businessman who received favors from the governor. On appeal, McDonnell argued his actions were part of being an elected official and fell beyond what federal bribery laws could prohibit.

The Supreme Court agreed. Chief Justice John Roberts, who wrote the Court’s opinion, appeared to anticipate a public backlash. “There is no doubt that this case is distasteful; it may be worse than that,” he wrote. “But our concern is not with tawdry tales of Ferraris, Rolexes, and ball gowns. It is instead with the broader legal implications of the government’s boundless interpretation of the federal bribery statute.” All eight justices sided with McDonnell, with the ninth seat vacant after Antonin Scalia’s death in February.

“The concern of the Court was that the prosecution not define ‘official act’—which is what the statute there required—too broadly,” Malloy said. “They thought that ‘official act,’ according to the prosecution, was basically anything a public official did by reason of their position or through the resources of their position. And the Court said, ‘No, no, no.’”

At the same time, Roberts also took an exceedingly generous view of McDonnell’s activities. Where the Justice Department saw an elected official providing special perks for a lucrative donor, the chief justice saw the risk that “conscientious public officials” could be hauled in by prosecutorial zealots. “Officials might wonder whether they could respond to even the most commonplace requests for assistance, and citizens with legitimate concerns might shrink from participating in democratic discourse,” he mused, as if to suggest judges and juries would not be able to tell the difference.

Randall Eliason, a George Washington University law professor and former federal prosecutor, described McDonnell to me as “a lawyerly opinion in the worst sense of the word.” By focusing on just one aspect of the statutory definition of “official act,” he said, the Court missed the broader issues with the relationship between McDonnell and an influential donor who showered him, and his wife, with lavish gifts. He offered a jarring hypothetical that illustrates how officials could leverage their power in a post-McDonnell world:

Currently, I could set up a system where I’m a governor and I tell everybody who might want to meet with someone in my cabinet to make a pitch, or try to get a contract, or advocate for some program. I could say, “Okay, I’ll set up a meeting for you. The cost is $10,000.” And that just goes in my pocket. That’s not a campaign contribution; it’s not going to be reported to the public anywhere. That’s just going to be a gift for me, and I’ll set up the meeting. I’m not going to tell anybody what to do, I’m not going to tell them what to decide, I’ll just get you in the room. And if you don’t pay me, no meeting.

Eliason and other legal observers had thought McDonnell could prevail in his appeal, but the scale of the ruling came as a surprise. “I mean, access is valuable, right?” Eliason told me. “And you can just pay for access as long as the official doesn’t actually agree to decide something for you, but can get you in the room with the other movers and shakers who are going to do it. Now that’s not considered corruption.”

Three months after the ruling, the Justice Department abandoned its efforts to prosecute McDonnell and his wife. “After carefully considering the Supreme Court’s recent decision and the principles of federal prosecution, we have made the decision not to pursue the case further,” it said in a terse press release. McDonnell celebrated the outcome, telling reporters his “wrongful” conviction was “based on a false narrative and incorrect law.”

If it hasn’t already, McDonnell could affect how prosecutors build corruption cases and limit the range of behaviors for which they’ll pursue charges. Those watching the Menendez case in New Jersey could be even more motivated to do so. But Malloy also warned that McDonnell fits into a broader pattern of how the Roberts Court approaches corruption in politics, and what it could do in future cases.

“We’re not simply talking about these criminal prosecutions. We’re talking about the full range of laws that attempt to protect the integrity of government,” she said, citing statutes on ethics, political transparency, and campaign finance the justices have taken a narrower view of. Malloy attributed the shift to the departure of Sandra Day O’Connor in 2005.

“Once upon a time, for instance, a campaign-finance law could be justified if there was a concern that money could provide influence or access to officials,” she explained. “The Supreme Court in recent years has said, ‘No, no, no, we don’t really care if your campaign contribution gets you access or ingratiation or a whole bunch of favors. We think corruption is much more like quid pro quo and maybe even just cash for votes.’”

In the 2003 case McConnell v. FEC, for example, O’Connor voted with the majority to uphold most of the McCain-Feingold campaign-finance-reform law. Seven years later, a five-justice majority—including Samuel Alito, O’Connor’s replacement—overturned McConnell in Citizens United v. FEC to allow unlimited independent expenditures in political campaigns. And in 2014, the Court struck down aggregate limits on campaign donations in McCutcheon v. FEC.

Following the justices’ decision last year, McDonnell’s impact quickly reverberated through other public-corruption cases, including two high-profile prosecutions in New York. In July, a three-judge panel in the Second Circuit Court of Appeals tossed out the conviction of Sheldon Silver, once the powerful state-assembly speaker. The judges ruled that the jury instructions had conformed to the pre-McDonnell standard of “official acts” and couldn’t be reconciled with the Supreme Court’s ruling. Three months later, in September, the Second Circuit also overturned the conviction of Dean Skelos, the state senate’s former majority leader, on similar grounds.

Silver had been convicted of extortion, fraud, and money laundering in 2015. Prosecutors said he helped funnel state funds to a Columbia University cancer researcher in exchange for millions of dollars; they also connected him to favorable-treatment deals for two real-estate development firms. Skelos was found guilty of eight corruption-related charges the same year for allegedly using his influence to secure jobs and payments for his son. Federal prosecutors plan to seek retrials for both Silver and Skelos, who were known as power brokers in the state.

McDonnell also came down as federal prosecutors were preparing to go to trial against Menendez, a senator since 2006. At the crux of the case is his friendship with Salomon Melgen, a wealthy Florida ophthalmologist and frequent campaign donor. Prosecutors have depicted Menendez as a personal legislator of sorts to Melgen. He allegedly used his political influence to help obtain visas for Melgen’s girlfriends, secure contracts for him in the Dominican Republic, and intervene in a Medicare billing dispute with the Department of Health and Human Services.

Menendez has denied any wrongdoing, and his lawyers argue the favors don’t rise to the newly heightened standard of official acts. Federal prosecutors, for their part, argue that the stream of benefits that flowed from Melgen to Menendez meet the threshold under federal law without linking specific quids to specific quos. Even though Walls declined to dismiss the charges against the lawmaker, he could still dismiss some of them later in the trial if the prosecution fails to present enough evidence. And like McDonnell himself, Menendez could also challenge any convictions under the stream-of-benefits theory on appeal.

Behind these legal doctrines and prosecutorial theories are questions about the popular legitimacy of the republican system—about voters being able to trust that the officials they elect aren’t the puppets of the country’s richest patrons. What McDonnell and other recent public-corruption rulings risk are institutions where cash and favors flow freely, where consequences are exceptional, and where public vice is made indistinguishable from civic virtue. No Americans expect a government of saints, but they expect their government to be able to root out the sinners in its midst.