Ms. Orlins was among the candidates who had argued that no one with prosecutorial experience should hold the job, while Ms. Crotty emphasized the need for public safety from the start of the race and won endorsements from several police unions.
In interviews, both said that while they disagreed with Mr. Bragg on certain points, they trusted him to do the right thing.
“He’s had experience of seeing loved ones incarcerated and their lives destroyed by the criminal legal system,” Ms. Orlins said. “He understands those things fundamentally.”
Ms. Crotty said it was important for Mr. Bragg to have a holistic vision of public safety for every neighborhood.
“I think that that’s a responsibility he’s always taken seriously,” she said.
On Tuesday, a number of voters in Harlem who said they had chosen Mr. Bragg described being impressed by what they perceived as his fundamental decency. Mimsie Robinson, 58, said that he heard Mr. Bragg speak at his church and had been struck by his integrity.
“For me, a lot of times that’s what I’m looking at,” Mr. Robinson said. “Is this person sincerely committed to helping this community, this city, move forward?”
Mr. Bragg, a graduate of Harvard Law School, began considering a career as a prosecutor while working for the federal judge Robert Patterson Jr., where he saw how influential those in the role could be. He worked for several years as a criminal defense and civil rights lawyer before being hired by the New York attorney general’s office, where he investigated public corruption and white-collar crime.
After a stretch working for Mr. Bharara in Manhattan, he returned to the attorney general’s office, where he led a unit responsible for investigating police killings of unarmed civilians. He spent the final week before his election in a virtual courtroom, questioning members of the Police Department in a judicial inquiry into the circumstances that led to the killing of Eric Garner in 2014.