City officials agreed to pay $12 million to the children of Daniel Prude, a Black man who died after police held him down until he stopped breathing after encountering him running naked through the snowy streets of Rochester, New York.

A federal judge approved the settlement in a court document filed Thursday. Rochester Mayor Malik D. Evans said in a statement that the agreement was "the best decision" for the city.

"It would have cost taxpayers even more to litigate, and would have placed a painful toll on our community," said Evans, who wasn’t in office when Prude died in March 2020.

The settlement money, minus lawyers’ fees and costs, will go to Prude’s five children, who are heirs to the estate, attorneys said.

GRAND JURY IN DANIEL PRUDE DEATH VOTED 15-5 TO CLEAR 3 COPS

"I think that it’s an amount of money that is sufficient to show that the City of Rochester recognizes that something very bad happened and that it’s very important for the city to put it in the rearview mirror and move forward," said lawyer Matthew Piers, who represents the administrator of the estate.

Police confronted Prude, 41, after his brother called to say the man needed mental health help. Prude had been taken to a hospital for a psychiatric evaluation earlier that night but was released after a few hours, and later bolted from his brother’s home.

Armin Prude and Joe Prude holding photo

Armin Prude, left, and Joe Prude hold an enlarged photo of Daniel Prude, Sept. 3, 2020, who died following a police encounter, in Rochester, N.Y.  (AP Photo/Ted Shaffrey, File)

Police video showed that Prude complied with police demands to get on the ground and put his hands behind his back. He became agitated as he sat, handcuffed, on the pavement.

Police then put a hood over his head to stop him from spitting and held him down for about two minutes until his breathing stopped. He died several days later after being taken off life support.

ROCHESTER INVESTIGATION INTO DANIEL PRUDE'S DEATH FAULTS MAYOR AND OTHER CITY OFFICIALS FOR KEEPING IT SECRET

The county medical examiner said his death was a homicide caused by "complications of asphyxia in the setting of physical restraint" and cited the drug PCP as a contributing factor.

The officers said they followed their training. A grand jury last year declined to bring criminal charges against them.

Daniel Prude's family wears matching t shirts and masks during celebration

The family of Daniel Prude, visiting from Chicago and Florida, participate in a community celebration of life in Prude's memory on September 10, 2020, in Rochester, New York.  (Joshua Rashaad McFadden/Getty Images)

The relatives’ lawyers said that Prude’s constitutional rights were violated by the police actions and what the family called an attempted cover-up by the department and city government.

EX-NEW YORK POLICE CHIEF SUES DEMOCRATIC MAYOR FOR ALLEGEDLY PUSHING 'NARRATIVE' IN DANIEL PRUDE DEATH PROBE

Emails released showed that in June 2020, Rochester police commanders urged city officials to hold off on publicly releasing the video because they feared violent blowback if it came out during nationwide protests that were then unfolding over the police killing of George Floyd in Minneapolis.

CLICK HERE TO GET THE FOX NEWS APP

Prude’s family eventually obtained the video and released it in September 2020.