No charges will be brought following an extensive investigation of New York City Mayor Bill de Blasio and his political associates, the U.S. attorney’s office on Thursday announced.

The investigation stemmed into de Blasio’s efforts to help elect Democrats to the state Senate in 2014 using county Democratic committees to aid candidates running in key swing districts outside of New York City including the Hudson Valley and in Monroe County.

Investigators also probed whether de Blasio’s donors sought favors in exchange for contributions to his political efforts, including the Campaign for One New York, conducted by the Manhattan District Attorney Cyrus Vance’s office.

“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,” said Joon Kim, the acting U.S. attorney.

“Although it is rare that we issue a public statement about the status of an investigation, we believe it appropriate in this case at this time, in order not to unduly influence the upcoming campaign and Mayoral election.”

In a separate letter to the state Board of Elections, Vance, too, determined no charges would be brought by his office even as he was critical of the fundraising efforts.

“This conclusion is not an endorsement of the conduct at issue,” he wrote. “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 finance process.”

The federal investigation had looked into whether de Blasio or his allies had skirted campaign finance laws by donating to county committees, which in turn aided the campaigns of Sens. Terry Gipson of the Poughkeepsie area and Ted O’Brien of Rochester, as well as candidate Justin Wagner in the Hudson Valley.

The announcement coincides days after the departure of former U.S. Attorney Preet Bharara, who had led the investigation into de Blasio as well as Gov. Andrew Cuomo’s closure of the Moreland Commission following an agreement on ethics reform changes in the state budget. Bharara announced in 2016 no charges would be brought in the Moreland Commission case.

The investigations had appeared to be winding down for the last several weeks after de Blasio met personally with federal prosecutors to discuss the probe.

De Blasio is running for a second term as mayor this November.