Kenneth Thompson has won the Democratic nomination for Brooklyn District Attorney, unseating Charles Hynes, who has held the job more than 20 years.
With 98 percent of precincts reporting Tuesday night, Thompson was leading with 55 percent of the vote.
There is no major party challenger in the general election.
Hynes has come under fire recently for his handling of some cases within the Orthodox Jewish community in Brooklyn. He was accused of catering to powerful rabbis who did not want abuse cases handled by secular authorities. Hynes denied any favoritism.