Charles "Joe'' Hynes, who obtained convictions in one of the city’s most infamous racial crimes and served 24 years as Brooklyn district attorney before being swept out of office amid controversy, died Tuesday.

Hynes first gained notice as a special state prosecutor in the 1970s investigating corruption in the nursing home industry and the criminal justice system. He also served as Fire Commissioner under Mayor Ed Koch. But he won national attention for prosecuting the white teenagers responsible for the death of a black man in Howard, Beach, Queens.

“Highlights? Howard Beach, Howard Beach was my greatest victory, as a trial lawyer,” he once said of his career.

In 1986, several white teens in Howard Beach attacked and chased three black men. Michael Griffith, 23, was hit and killed by a car as he ran away. Appointed by Governor Mario Cuomo as a special prosecutor, Hynes won three manslaughter convictions. The case was made into a television movie, “Howard Beach: Making a Case for Murder,” with actor Daniel J.Travanti playing Hynes.

"What I was impressed with Hynes at that point was his empathy for the community, especially a white Irish guy being understanding and sensitive to the needs of the people in the African American community with regard to the enormous racial tension that was taking place," says longtime civil rights lawyer Norman Siegel.

Hynes parlayed that success to win election as Brooklyn district attorney in 1989. He served six terms, and claimed he convicted more corrupt politicians and judges that any prosecutor in state history.

He also created treatment programs for non-violent drug offenders and a special unit for domestic violence incidents, in memory, he said, of his late mother, who was abused by her husband.

"I have spent a considerable part of my career as district attorney ensuring that no victim in Brooklyn suffered the way my mother suffered, and no kid had to watch what I had to watch,” Hynes reflected in 2013. “I would have to put that as the pinnacle of my success.’’

Hynes lost the Democratic primary for state attorney general in 1994, and for governor in 1998.

His tenure as district attorney also was marked by controversy, including more than a dozen wrongful convictions.

"All of a sudden you put  two, three, four people in jail who were wrongly convicted , you got to take the heat for that. And he did,” says Michael Daly, a longtime New York columnist now with The Daily Beast.

A State report criticized his office's handling of the case against Lemrick Nelson in the death of Yankel Rosenbaum, the Hasidic scholar killed in the racially charged Crown Heights riots. Jurors told state investigators the prosecution’s case was poorly prepared and poorly presented.

In 2013, Hynes lost to Ken Thompson in the Democratic Primary for district attorney, and again after running as a Republican that November.

“Do you regret this run?” he was asked after he conceded.

“No, not at all,” Hynes said.

Hynes also was an author; his novel, “Triple Homicide,” was published in 2007 while he was D.A.

Last year, the city Conflicts of Interest Board slapped Hynes with a record $40,000 fine for using official equipment and email in that final campaign.

His health declined after a stroke in 2016. He died in a Florida hospice. Hynes was married more than 50 years and had five children. He was 83 years old.