Former Brooklyn District Attorney Charles Hynes avoided charges after being suspected of spending more than $200,000 seized from criminals to fund a media consultant for political work.

Former Brooklyn District Attorney Charles Hynes has dodged charges in a federal corruption probe, authorities said Friday.

Hynes, 81, was suspected of using more than $200,000 seized from criminals to pay his longtime media consultant Mortimer Matz for political work.

Brooklyn federal prosecutors targeted Hynes after a Department of Investigation report concluded that Matz, while working out of the DA’s office, was acting as Hynes’ campaign adviser in the run-up to the lawman’s failed 2013 re-election bid.

But the investigation was closed without any charges being brought against Hynes or Matz.

“We have concluded that there is insufficient evidence at this time to support filing federal criminal charges,” Assistant U.S. Attorney James D. Gatta wrote in a letter sent to Hynes’ lawyer Sean Haran on Friday.

“Accordingly, our investigation is closed.”

Haran hailed the decision.

“We have always been confident that this would be the end result, as Joe faithfully abided his moral and ethical duties,” the Manhattan-based lawyer said.

Matz’s lawyer Richard Greenberg also celebrated the news.

“It is doubtful that any law enforcement office was ever seriously investigating Morty for any criminal conduct, so it is not a surprise to hear today’s welcome news,” Greenberg said in a statement.

Greenberg added that the DOI report “unfairly and baselessly tarnished” the 92-year-old Matz.

A spokesman for the Brooklyn U.S. Attorney’s Office declined comment.

Hynes served as Brooklyn’s chief prosecutor for more than two decades before he lost in the Democratic primary to challenger Kenneth Thompson.

Thompson went on to win the election. He died of cancer in October at the age of 50.