The mayor. Photo: Drew Angerer/Getty Images

Federal and state prosecutors said Thursday that Mayor Bill de Blasio will not face prosecution in separate nearly yearlong campaign-fundraising probes.

The decision comes less than a week after the Trump administration fired U.S. Attorney Preet Bharara from his post. Bharara had overseen an investigation into allegations that de Blasio or his team had doled out preferential treatment to fundraisers in exchange for donations to his 2013 campaign or Campaign for One New York, the mayor’s now-closed nonprofit. In a brief statement, the acting U.S. Attorney for the Southern District of New York, Joon H. Kim, effectively cleared the mayor and his associates, saying that after “careful deliberation given the totality of the circumstances here and absent additional evidence, we do not intend to bring federal criminal charges against the Mayor or those acting on his behalf relating to the fundraising efforts in question.” The statement went on to point out that it “is rare” to discuss the status of a probe, but that prosecutors “believe it appropriate in this case at this time, in order not to unduly influence the upcoming campaign and Mayoral election.”

The Manhattan district attorney also said Thursday that it was ending its investigation into whether the mayor had violated campaign-finance law by improperly channeling money to Democratic candidates in the 2014 New York State Senate race. Manhattan D.A. Cyrus Vance Jr., who had reportedly convened a grand jury on the matter last year, said pointedly that the mayor “may have violated the Election Law” but that “this office has determined that the parties involved cannot be appropriately prosecuted.”

These coordinated announcements end months of intense scrutiny for de Blasio, who was himself grilled by the feds in a four-hour interview last month. It also removes, at least for now, the one wild card from the 2017 mayoral race, and makes it even less likely that a viable Democratic challenger will risk taking on the popular-enough mayor in a very safe city.

De Blasio had firmly denied any wrongdoing in both the state and federal investigations from the outset. He told WNYC’s Brian Lehrer that he and his aides “acted appropriately, we acted lawfully, we cooperated from the very beginning. Of course we stayed both with the spirit and the letter of the law.” A (probably much lighter) de Blasio is expected to formally brief reporters later, says NBC 4.

This post has been updated with additional details.