During New York City’s crack era in the early 1990s, with homicide tallies five times those of today, the authorities resorted to ruthless law enforcement.“The police would pull your car over at will, just because you were Black, and go through the car and your pockets,” said Derrick Hamilton, 57, who grew up in public housing in Brooklyn in the 1980s and was first arrested as a teen. “They’d pull your socks off, pull your pants off.”Crime fell across the country during the ensuing decades in a broad societal shift, and New York become one of America’s safest big cities and a thriving tourist destination. But in its darkest days police and prosecutors had cut corners and used tactics that left untold numbers of innocent people — mostly poor men of color — imprisoned on bogus murder, rape and robbery charges.The prisoners’ dogged legal challenges prompted reinvestigations helped by left-leaning prosecutors, advances in DNA testing, pressure from newly formed advocacy groups and generous government restitution, turning New York into a national hotbed of exoneration. In recent years, one innocent middle-aged man after another has been released, ravaged by years in prison, into a tamer city.There is no more striking personification of the change than Yusef Salaam, 49, who was arrested in the infamous 1989 Central Park jogger rape case, in which detectives coerced false confessions out of five Harlem teenagers. They were exonerated after years in prison.Last month, Mr. Salaam won a Democratic primary for a City Council seat, making him all but certain to become the first exoneree to hold elective office in the city.“It was inconceivable in the 1990s that Yusef Salaam could be elected to the City Council, but all these years later, there’s a change in the public consciousness and there’s now a willingness to put victims from that era in positions of authority,” said Joel Rudin, a lawyer who has handled dozens of wrongful conviction claims. “We’ve come a very long way.”Yusef Salaam said he was wrongly imprisoned by a brutal system of law enforcement working as it was designed.Jeenah Moon for The New York TimesOnce, prosecutors’ offices were invested in defending bad convictions, but now they uncover them with review units in all five boroughs. Progressive district attorneys who campaigned on the issue have dismissed hundreds of lower-level convictions linked to discredited police officers.The cause has attracted wealthy patrons, as well as prestigious law firms now devoting pro bono work. It has become fodder for documentaries, docudramas and podcasts.For the exonerated, compensation cases are being settled for increasing amounts, often totaling well over $10 million. Over the past decade, the city has paid out about $500 million. And payouts for claims against New York State, another source of compensation, are among the country’s highest.Taken together with recoveries from civil rights cases, the more than $1 billion paid out to those wrongly convicted in New York is the highest of any state in the country by far, according to Jeffrey Gutman, a law professor at George Washington University. A small industry of private lawyers has sprung up to help former prisoners get paid, and to get paid themselves.The situation was engendered by a very different New York. For many residents, streets and subways were to be avoided after dark. Bryant Park in Midtown, today a revitalized urban gem, was a drug market. In 1990, there were nearly 2,250 murders, five times today’s totals.For the police, it was a time to crack down on minor offenses, and street crime units operated under the motto “We own the night.”The desperation to catch and convict at any cost fostered “a willingness to bend the rules,” Mr. Rudin said.Emboldened detectives manufactured cases by manipulating witnesses, coercing confessions, using suggestive identification procedures and withholding exonerating evidence, he said. Locking up a certain percentage of innocent people was simply “collateral damage.”Since his release, Derrick Hamilton has used his skills as a paralegal trying to free other inmates from prison.Anthony Lanzilote for The New York TimesMr. Salaam said in an interview last week that he and the other members of the Central Park Five were “run over by the spiked wheels of justice,” thanks to detectives who knew which levers they could pull in 1989.“The system was operating exactly how it was designed,” he said. “These were people who were supposed to be protecting and serving us, but they literally built their careers off the backs of folks just like me.”As the city’s economy improved and unemployment declined throughout the 1990s, murder and other violent crime decreased. Bad arrests continued nonetheless.Rudolph W. Giuliani took office in 1994 with a pledge to crack down on crime through aggressive policing. His administration was plagued by allegations of police brutality and civil rights abuses, as well as wrongdoing like the torture of Abner Louima and killing of Amadou Diallo.The highest totals of bad convictions in the city came in 1997, when there were 22, of which 15 were for murder, as listed on the National Registry of Exonerations. The group lists at least 230 exonerations for New York City since 1989.“Detectives were expected to clear cases, and once they had made up their mind, they’d stop investigating,” said Irving Cohen, 80, who has represented about 15 wrongfully convicted New Yorkers since the late 1980s. He recalled receiving weekly letters from inmates asking for help. “There were a lot of homicides,” he said. “They did whatever they had to do to get the person convicted, whether they believed the person was guilty or not.”Irving Cohen, left, has represented wrongly convicted New Yorkers since the 1980s.Dave Sanders for The New York TimesMr. Salaam’s exoneration in 2002 was a stunning reversal, one of the first cases that showed the pitfalls of New York’s wholesale justice. A convicted murderer and serial rapist admitted that he was responsible for the attack, and the Manhattan district attorney’s office filed court papers clearing Mr. Salaam and the other members of the Central Park Five.But some police officials continued to blame the wrongly convicted men despite D.N.A. evidence. The district attorney at the time, Robert M. Morgenthau, found no coercion by officers or prosecutors.Many dismissed cases involved a relative handful of officers, including Louis Scarcella, a former Brooklyn homicide detective whose conduct has led to the review of dozens of cases and to at least eight murder convictions being overturned. Mr. Scarcella has denied any wrongdoing.One of his cases was that of Mr. Hamilton, who served more than 20 years on a 1991 murder charge. He litigated from prison, with limited access to phones and correspondence materials. He drafted briefs from a cramped cell, researched cases in a meager law library and wrote legal letters longhand from solitary confinement.For Mr. Hamilton, things changed when a key eyewitness came forward years after his conviction to say that Mr. Scarcella had coerced her into lying.Louis Scarcella’s conduct as a Brooklyn homicide detective led to at least eight murder convictions being overturned.John Taggart for The New York TimesThe case was taken up by the Brooklyn district attorney’s conviction integrity unit, which, with more than 30 exonerations since 2014, is one of the most robust units in the nation and one reason the borough has by far the highest number of overturned convictions of any in the city, with 88 on the national registry.In 2019, after the Bronx prosecutors’ conviction integrity unit and the Innocence Project presented new evidence, a judge vacated the 1989 murder conviction of Huwe Burton, who had been coerced by detectives into a false confession at age 16.The Bronx district attorney, Darcel Clark, said that detectives had used the discredited practices of the era.“What they did was not necessarily wrong — that is the way things were done then,” she told The New York Times in 2019. “For 1989, that was standard practice for the N.Y.P.D., but now we know better.”Huwe Burton was wrongly convicted at 16 and spent decades in prison. The district attorney said detectives had followed the norms of 1989.Gregg Vigliotti for The New York TimesSome disagree. Police and prosecutors are almost never disciplined for misconduct, including coercing innocent suspects into confessing, said Rebecca Brown, who for the past eight years was director of policy at the Innocence Project in Manhattan.And police still can lie and make false promises to suspects, including children, to elicit false confessions, she said.“Many of the contributing causes are still alive and well in New York City,” she said. “There’s nothing resembling robust accountability.”Still, changes have been made to interrogations and suspect lineups, and there is more oversight of prosecutors and access to officers’ discipline records.Standards have been improved for obtaining more reliable confessions and identifications, Mr. Rudin said, adding that judges and prosecutors are now generally more skeptical of cases built around jailhouse informants. Defense lawyers, previously stymied by limited access to prosecutors’ case information, are now entitled to more of it, and can prepare a proper defense, he said.And the politics have changed. In Mr. Salaam’s City Council campaign, he spoke often about his conviction and exoneration. In his interview, he urged measures like drug treatment instead of prison for drug offenders and allowing lower-level offenders to avoid Rikers Island.“We don’t want to put innocent people in jail,” he said.As for Mr. Hamilton, he has worked since his release as an activist and paralegal to identify and overturn other wrongful convictions, including numerous ones linked to Mr. Scarcella. He is part of a brotherhood of exonerees who cooperate to prepare legal briefs and continue to visit inmates, donate money and raise awareness about cases.“My loyalty,” he said, “is to those guys still wrongfully in prison.” More