NEW YORK — Three men convicted of murdering an off-duty police officer and a business owner nearly 25 years ago were released from prison Friday after a judge declared they were wrongfully convicted because evidence that may have exonerated them was "deliberately withheld" from their lawyers.

The arrests in 1996 of George Bell, Rohan Bolt and Gary Johnson were heralded by then-New York Mayor Rudolph W. Giuliani, who had vowed days before their apprehension that justice would be served swiftly, lawyers for the men say. But on Friday, Queens County Supreme Court Judge Joseph Zayas said the prosecutors who secured their convictions had suppressed information “that others may have committed these crimes.”

Speaking via video from Green Haven Correctional Facility, a maximum-security prison north of New York City, the three men thanked those who worked to earn their freedom.

“After I was convicted for capital murder, I couldn’t fathom or wrap my mind around how God would allow the justice system I believed in to fail me in such a tragic fashion,” said Bell, who confessed to authorities in connection with the shooting deaths of New York police officer Charles Davis and another man, Ira Epstein, whose check-cashing store in Queens was robbed the morning of Dec. 21, 1996.

Although Bell and Johnson, then 19 and 22 years old, respectively, both confessed, they had been “subject to coercive interrogations” and their statements “bear all the hallmarks of the false confessions that resulted in wrongful convictions in the past,” according to a motion filed earlier Friday by private attorneys and public defenders involved in the effort to overturn their convictions.

At the time of the crimes, Bell had a job stocking shelves at an Old Navy and Johnson was a store clerk. They did not have criminal records, nor did they know Bolt, who authorities alleged was their accomplice in the botched robbery.

Bell gave a confession “riddled with inconsistencies and inaccuracies, a product of the fact that its details were fed to him by detectives who were working with incomplete and faulty information,” the attorneys wrote.

Bolt, 35 at the time and a father of four who owned a Caribbean restaurant, never confessed. He was arrested based on an identification from a purported witness with a history of drug use and “no known connection to the crime,” according to the court filing detailing the case’s history.

After testifying in his defense and maintaining his innocence, Bolt turned to the victims’ widows at his sentencing and offered condolences but said he “did not have anything to do with the murders . . . I know one day God will show them the truth, that Rohan Bolt did not have nothing to do with it,” according to a 2007 Village Voice account.

Reached Friday, Davis’s widow declined to comment. Attempts to reach Epstein’s family were unsuccessful.

A spokeswoman for the New York Police Department declined to comment. Patrick J. Lynch, president of the New York City Police Benevolent Association, issued a blistering statement, however, saying Davis’s family is “devastated by the possibility that nobody will be held accountable for his murder.”

“There is absolutely no reason that these convicted cop-killers should be put back on the street,” Lynch said in the statement, arguing that if Queens District Attorney Melinda Katz “does not believe there is sufficient evidence of their innocence,” the suspects should stay in prison while the matter is evaluated.

Katz said at the start of Friday’s court proceeding that it was “a tragic case that affected many lives,” describing Davis as a hero who died trying to protect Epstein. Davis had been working at the shop as a side job while off-duty. He was helping Epstein open the store around 7 a.m. when it was held up by several men.

Describing the errors as an “inadvertent failure” by trial prosecutors, Katz consented to the men’s convictions being wiped because failing to alert the defense to the potential role of a third party amounted to “a Constitutional violation that we simply can’t defend.”

The cases were handled under the supervision of District Attorney Richard A. Brown, who was in office for nearly 30 years. He has since died.

Zayas, the judge, granted prosecutors 90 days to reexamine the case.

Starting in 2019, disclosures made in an unrelated matter revealed evidence that suggested others were potentially responsible — information that existed during the men’s prosecution and, by law, should have been provided immediately to their attorneys.

Lawyers for Bell, Bolt and Johnson argued there was no physical evidence connecting the men to the crime. There was evidence, however, that a robbery crew known as Speedstick had been involved, but the records to support that were withheld from defense lawyers, the district attorney’s office conceded.

The fatal shooting was closely covered by New York media and prompted an aggressive response by the NYPD and Giuliani, who met the family of the slain officer at the hospital. At the time, New York City was plagued by gun violence and numerous police officers were among the victims.

Giuliani, who made his name in New York as a tough-on-crime federal prosecutor and then as “America’s mayor” in the aftermath of 9/11, was eager to announce the arrests, according to the Village Voice account reexamining the case.

“Detectives wanted to interrogate Bell and Johnson some more, but Giuliani couldn’t be held back for long,” the article’s author wrote. “As Bolt was being arrested around 3 p.m. that day, Giuliani was already handing out attaboys and exchanging hugs with detectives at a Christmas Day press conference.”

In a text message, Giuliani said he “never rushed any arrest.” He did not elaborate.

Speaking during Friday’s hearing, Bell thanked “God for keeping my parents alive to see this day.”

Bolt expressed gratitude to his legal team.

Johnson said he was “extremely joyful” but has “a lot of anger in my soul.”

Julie Tate in Washington contributed to this report.