For months, investigators scrutinized whether New York City Mayor Bill de Blasio had exploited a loophole to illegally evade campaign contribution limits. But in the end, he avoided legal trouble not because prosecutors had determined that his fundraising scheme was perfectly legal – but because he had the foresight to get the green light from a lawyer first.

When federal and state prosecutors revealed Thursday that they will not criminally charge the mayor or his aides, Manhattan District Attorney Cyrus Vance Jr., who spearheaded the state-level probe, noted that de Blasio and his team’s behavior in an effort to elect Democrats to the state Senate in 2014 may have actually violated election law. But Vance wrote that to prosecute them, he would need to prove that the mayor and his allies knowingly overstepped the bounds. De Blasio’s dependence on an attorney demonstrated the opposite, Vance concluded: that the mayor aimed to follow the letter – if not the spirit – of the law.

“After an extensive investigation, notwithstanding the BOE’s view that the conduct here may have violated the Election Law, this office has determined that the parties involved cannot be appropriately prosecuted, given their reliance on the advice of counsel,” Vance wrote in a memo, adding that he did not endorse the behavior in question. “Indeed, the transactions appear contrary to the intent and spirit of the laws that impose candidate contribution limits, laws which are meant to prevent ‘corruption and the appearance of corruption’ in the campaign financing process.”

De Blasio’s defense that he relied on a lawyer looks like a lifesaver beyond the reach of most New Yorkers. After all, who would expect to escape charges by telling police they cracked open a beer on their stoop because a law student living down the block said open container laws do not apply in quasi-public spaces?

This tactic of claiming to have inadvertently broken the law or having relied on the advice of an attorney is quite common, however, particularly when it comes to complex matters like election and tax laws.

Attorneys said several criminal charges can only apply if someone intended to break the law, under what’s known in courtrooms as  “mens rea,” or the mental state of a potential defendant. For instance, Sarah Steiner, an election attorney, said theft cases “can’t just be something that attached by Velcro to the back of your sweater in the changing room.”

When it comes to more complex laws, relying on an attorney’s expertise makes sense because no lawyer would simply offer advice that aligns with a client’s goals at the expense of ruining their professional reputation, said Jennifer Rodgers, a former assistant U.S. attorney who now works as executive director of the Center for the Advancement of Public Integrity at Columbia University Law School.  

“You can’t say I murdered my wife because my lawyer said it was OK,” Rodgers said. “But there are certain offenses for which an advice of counsel defense is an affirmative defense. And they are the types of crimes where the law is unclear or very complicated, like taxes.”

Other attorneys agreed that federal corruption provisions and New York election law qualify as complex. U.S. Attorney for the Southern District of New York Joon Kim said his team would not bring public corruption charges after examining in a separate probe how de Blasio and his team solicited contributions from people who sought favors from City Hall, and then directed matters to city agencies on their behalf.

“In considering whether to charge individuals with serious public corruption crimes, we take into account, among other things, the high burden of proof, the clarity of existing law, any recent changes in the law, and the particular difficulty in proving criminal intent in corruption schemes where there is no evidence of personal profit,” Kim said in a statement.

On the state level, Vance went so far as to say “apparent ambiguities” in campaign protocols should be clarified via legislation in a memo to state Board of Elections Chief Enforcement Counsel Risa Sugarman. At Sugarman’s request, Vance examined whether de Blasio’s team intentionally evaded limits placed on how much money one person or organization could give to an individual candidate’s committee during the 2014 election cycle. Vance noted that de Blasio and his allies urged unions and wealthy donors to contribute to the Democratic Party’s county-level committees, which could accept donations nearly 10 times larger than individual candidates’ committees. The county organizations then funneled the money to campaigns of de Blasio-backed Democrats, which promptly spent large sums with consulting firms close to de Blasio. In the memo, Vance wrote that “the facts here do not make out a provable violation of the Election Law’s criminal provisions. Nevertheless, they appear contrary to the intent and spirit of the law.”

Attorneys City & State spoke to offered different views on whether political campaigns – and the lawyers they rely on – will change their practices to steer clear of the conduct Vance called into question.

Steiner said political players now have a clear instruction not to route money through county committees to individual candidates. “In the text of these remarks (Vance’s memo), particularly the portions where they talk about how it’s not the intent of the law to have this happen, I think this puts people on notice that they should not be doing this,” she said. “So I don’t see them doing it.”  

Rodgers, however, did not expect Vance’s statements to alter campaign practices. She said prosecutors have aggressively pursued corruption in recent years, which has prompted politicians to be more careful about not directly connecting contributions to any government action. “But it still remains the case that it’s perfectly legal to take campaign donations from people who do business with the government and then who later will come kind of seeking things from the government,” she noted.

If nothing else, the outcome underscores the value of seeking legal advice for a political campaign, even if it’s expensive.

“The world isn’t exactly a fair place,” Steiner said. “If you don’t have enough money to get a legal opinion, you’re unlikely to have enough money to be making questionable distributions to others.”