Mayor Bill de Blasio caught a break Thursday. No state or federal criminal charges will be filed on the New York City mayor’s fundraising practices or his bid to dethrone Republicans in Albany. Top prosecutors said he had acted within the law. But that doesn’t mean the laws are good.

For more than a year, de Blasio has faced down the barrels of investigations into how he raised money and what that money bought. Inquiries looked into donations to his 2013 campaign and his now-shuttered political nonprofit organization, the Campaign for One New York. Did that money come with the expectation of action on issues dear to the donors, such as a $100,000 contribution for a multimillion-dollar deal on supposedly rat-repellent garbage bags? What about donations from animal-rights groups and developers to get horse carriages out of Central Park?

advertisement | advertise on newsday

The other inquiry looked into de Blasio’s efforts to help Democrats gain control of the State Senate in 2014. Aides cajoled funds from businesses with issues before the city and directed them to obscure county committees as a way to get around strict limits on individual donations. The money ultimately made its way to candidates.

De Blasio’s actions were business as usual in New York politics. Campaigns need donors. Do all donors give out of the goodness of their hearts?

The mayor repeated Thursday that he had always followed careful legal advice, adding that “nothing that was done was illegal or inappropriate.”

In an unusual coordinated announcement, Acting U.S. Attorney Joon Kim and Manhattan District Attorney Cyrus Vance agreed. Vance took the unusual step of noting instances when the mayor appeared to toe right up to the line of legality, and he described the mayor’s actions as contrary to the “intent and spirit of the law.”

advertisement | advertise on newsday

Lifting the threat of charges means this year’s mayoral campaign can go on without enduring fog. State laws, however, are still murky. Vance recommended detailed guidance from the state Board of Elections on what is permissible and the passage of laws to ban the blatant circumvention of campaign finance limits. De Blasio’s actions on that front were within the law. They shouldn’t have been. — The editorial board