Challenger Wins Primary for Brooklyn District Attorney Kenneth P. Thompson delivering his victory speech Tuesday night after defeating Charles J. Hynes, the incumbent, in the Democratic primary for Brooklyn district attorney. Kenneth P. Thompson, a former federal prosecutor, performed the rare feat of defeating a sitting district attorney by beating Brooklyn's six-term incumbent, Charles J. Hynes, on Tuesday in the Democratic primary. Mr. Hynes, right, with Councilman Lew Fidler, left, campaigned at the Midwood Senior Citizen Center in Brooklyn on Tuesday. He still has a spot on the November ballot. The primary followed a fierce race that often seemed more a referendum on Mr. Hynes's lengthy record than a choice between two candidates. Though Mr. Hynes had faced serious and sometimes divided opposition before, this year's race pitted the 78-year-old district attorney against a single well-financed candidate who rallied anti-Hynes sentiment in the borough. Mr. Thompson, 47, used a torrent of negative publicity about prosecutorial behavior in Mr. Hynes's office to paint the incumbent as unethical and out of touch. With 99 percent of precincts reporting, Mr. Thompson had 55 percent of the vote. Mr. Hynes had previously secured the Republican party's ballot line for the general election, but his campaign manager, George Arzt, said early Wednesday that Mr. Hynes would not continue campaigning. A fixture of Brooklyn politics since he took office in 1990, Mr. Hynes is one of the longest-serving district attorneys in a city where unseating district attorneys is considered next to impossible. This year, however, he was considered vulnerable after winning only 41 percent of the vote in a four-way race in 2005. More recently, Mr. Hynes was forced to backtrack or re-evaluate several murder convictions from the early part of his tenure, and was dogged by his handling of cases in Brooklyn's ultra-Orthodox Jewish communities, most of whose leaders endorsed him. Mr. Hynes was seen as slow to prosecute child sexual abuse allegations against ultra-Orthodox Jews because of rabbinical resistance, but stepped up abuse prosecutions in the last year, and won a significant case involving a therapist who sexually abused a young patient. This put Mr. Hynes, politically, in somewhat of a precarious position, as some ultra-Orthodox Jews resented the prosecutions. But one Hasidic voter, who would only give his first name, Martin, said he had chosen Mr. Hynes at the strong urging of the community's religious leaders. "The leaders told us he'd be better for us," he said. Doubts about Mr. Hynes's record helped his rival, Mr. Thompson, secure some notable endorsements, including from Local 1199 of the Service Employees International Union, the city's largest union; all four U.S. representatives from Brooklyn; and celebrities like the actor Chris Noth. The son of a New York City police officer who grew up in the projects, Mr. Thompson worked on the Abner Louima case as an assistant federal prosecutor in Brooklyn; as a lawyer in private practice, he represented Nafissatou Diallo, the hotel housekeeper who accused Dominique Strauss-Kahn, the former head of the International Monetary Fund, of sexually assaulting her in 2011. Mr. Thompson focused his attacks on the questionable behavior of several members of Mr. Hynes's staff, including his deputy, Michael Vecchione, whose conduct in a murder case drew sharp criticism from two federal judges. Mr. Hynes ultimately agreed to allow the defendant, who had spent 15 years in prison, to have his murder conviction vacated. Mr. Hynes's prosecutors also have come under scrutiny for relying on the problematic testimony of a detective, Louis Scarcella, to win murder convictions, some of which the office is now reviewing. Aiming for black voters, Mr. Thompson also accused Mr. Hynes of remaining passive on issues important to minority communities, like stop-and-frisk policing. Mr. Hynes, meanwhile, often seemed barely able to contain his contempt for his opponent, whom he derided as lacking managerial experience and for bungling the Strauss-Kahn case. Manhattan prosecutors ultimately dropped charges against Mr. Strauss-Kahn amid serious doubts about Ms. Diallo's credibility. In Bedford-Stuyvesant, Lisa Davis, 49, said she had voted for Mr. Thompson because it was time for Mr. Hynes to go. "There have been some issues, I guess," she said, mentioning the voided homicide convictions. She also has friends who work for Mr. Hynes, she said, who dislike the way he runs the office. But Mr. Thompson's confrontational campaigning style did not sit well with Julie Oyefeso, 62, who said the personal attacks had made her more loyal to Mr. Hynes. "He's been doing a good job," she said. There's no reason to take away his job.