Late last month, 53-year-old Ruddy Quezada was released from prison after serving 24 years for murder. The Brooklyn District Attorney’s office conceded that prosecutors in the office for years had failed to turn over potentially critical evidence to Quezada and his lawyers as they mounted repeated appeals of his conviction.

With Quezada’s release, a veteran prosecutor in the district attorney’s office resigned. The prosecutor, Marie-Claude Wrenn, had overseen the search for any evidence showing that prosecutors might have coerced the only eyewitness to testify against Quezada at his murder trial in 1993. It turned out that Wrenn had found just such potential evidence more than a decade ago – a copy of what is known as a material witness order, a powerful tool that allows prosecutors to hold reluctant witnesses in custody until they agree to testify – but had never given it to Quezada’s lawyers.

David Shanies, a lawyer for Quezada, said he had been left “shocked and disturbed by the pervasive prosecutorial misconduct this case revealed.”

Shanies said he is astonished that the prosecutor who tried the murder case against Quezada in the first place remains in office, and with the full support of Brooklyn District Attorney Ken Thompson. The prosecutor, Ephraim Shaban, had obtained the material witness order, but failed to disclose its existence to Quezada’s trial lawyer. Across the next two decades, as Quezada pressed his appeals, Shaban had insisted he had no memory of ever securing the witness order. And he said, under oath, that he had made no effort to search for it.

“The misconduct in this case clearly began at the trial,” Shanies said. “I can’t fathom why they would stand behind that conduct.”

Thompson was elected Brooklyn district attorney in 2013 after campaigning against what he claimed was his predecessor’s long history of condoning misconduct by the office’s prosecutors. He pledged to reform the office and not to tolerate further abuses.

“As officers of the court and servants of the public, we must be held to the highest ethical standards,” Thompson said when he announced his reform plan after taking office.

Shaban continues to work for Thompson in a senior position. He is a deputy bureau chief and makes $134,000 a year.

Oren Yaniv, a spokesman for Thompson, said the district attorney’s office “had found no evidence of misconduct on the part of Shaban during the original trial or the appeal process.” Neither Shaban nor Wrenn would be interviewed.

ProPublica reported on the use of material witness orders in 2013, and highlighted Quezada’s then pending appeal. The witness who had testified that Quezada was the gunman responsible for killing an innocent bystander in 1992 had recanted. The witness, Sixto Salcedo, had signed an affidavit saying that he had only testified against Quezada after being arrested by detectives and held at a Brooklyn motel where he was threatened with prison if he didn’t name Quezada as the killer. His recantation had prompted Quezada’s lawyers, in their appeals, to explore the circumstances of how Salcedo’s testimony had been gained.

Material witness orders, we wrote in 2013, are meant to help prosecutors compel testimony from problematic witnesses in criminal cases. But the orders, which must be signed by judges, are supposed to be used only as a kind of last resort, often when prosecutors fear a potential witness might flee instead of testifying.

Once detained, such witnesses are supposed to be brought directly before a judge and provided with a lawyer. A hearing is then supposed to be held to explore the reasons behind a witness’ reluctance to testify: Is it fear? Possible complicity in the crime? Or are witnesses being intimidated into testifying falsely?

Some defense lawyers told us in 2013 that they were concerned about how often local prosecutors might have disregarded the safeguards meant to protect the witnesses.

“A material witness warrant secures a witness’s presence at a trial or grand jury proceeding,” Judge Gerard E. Lynch of the Second Circuit wrote in a 2013 opinion. “It does not authorize a person’s arrest and prolonged detention for purposes of investigative interrogation by the police or a prosecutor.”

Shaban had a serious problem on his hands as he prepared for Quezada’s murder trial in late 1992. One of his witnesses, John Delacruz, had been shot to death in the Bronx. Shaban’s case would now hinge on the testimony of a sole witness, Salcedo. Salcedo had a history both as a drug dealer and as an informant for the federal Drug Enforcement Agency.

Salcedo initially had fingered Quezada, but as the trial approached he began skipping appointments with Shaban, prosecutors said in court filings. Shaban was worried enough about the case that, by his account, he offered Quezada a deal to plead to a charge of manslaughter. In recent testimony, Shaban recalled checking with his supervisor.

“I informed her that one of my witnesses was killed, my other witness was uncooperative, and there was no way to prove this case,” Shaban testified. “At which point I said we really should lower the offer and see if we can dispose of this.”

Quezada declined.

Shaban then went before Justice Abraham Gerges of State Supreme Court and obtained a material witness order. It authorized him to have Salcedo arrested and brought before the judge. According to the Brooklyn District Attorney’s office, Salcedo was found and brought to court directly to testify, but did not do so until the following day because of an adjournment. Records show that Salcedo spent at least one night in custody at a Brooklyn hotel.

Salcedo, in his sworn affidavit, says that during his stay in the hotel he was threatened with prison by a detective if he did not testify against Quezada. He says he was told exactly how to testify. To this day, prosecutors and police deny this happened.

Salcedo eventually did testify – in a sealed proceeding meant to protect his identity as a drug informant and because of alleged threats against his family. Quezada was convicted and sentenced to 25 years to life in state prison.

Shaban never informed Quezada’s lawyers that a material witness order had been executed and that Salcedo had testified against his will. In his summation to the jury, Shaban told jurors they should credit Salcedo’s testimony because he was the rare person who “came forward.”

“He was not hesitant,” on the witness stand, Shaban said, and his answers were quick and “spontaneous.”

Today, the Brooklyn District Attorney’s office maintains that it didn’t matter whether Shaban formally disclosed the existence of the material witness order. The office argues that it would have been obvious to Quezada’s lawyers because Salcedo appeared in the presence of detectives and the courtroom had been sealed.

Peter Birkett, Quezada’s trial lawyer, has testified that he didn’t know about the order, and that if he had, he surely would have used that fact to try and call into question Salcedo’s testimony. Indeed, he testified that he’d never in his roughly 20 years practicing law ever even seen a material witness warrant.

Shanies, Quezada’s current lawyer, said he found Shaban’s conduct unacceptable.

“The trial prosecutor had his only witness locked up on a material witness order and days later stood before the jury and told them he was a good Samaritan who came forward to testify,” said Shanies, who has represented Quezada pro bono.

Last week, ProPublica reached Gerges, the retired judge who had signed the material witness order. He said he was not aware Shaban had failed to give the defense the order. “There is no question it should’ve been turned over,” he said.

In 2003, Quezada appealed for a new trial, and cited Salcedo’s account of his coerced testimony. The district attorney’s office called Salcedo’s claims incredible, and insisted he had testified truthfully and freely. To support the claim, the office said there was no evidence that something like a material witness order had been used to compel Salcedo’s testimony.

“There is no copy of a material witness order in the file,” Wrenn, who had spent her entire career at the office handling appeals, declared in court papers. “Moreover,” she claimed, “neither Assistant District Attorney Shaban or Detective Buda recall that a material witness warrant was either necessary with respect to Salcedo or requested from the court.”

Quezada’s appeal was rejected.

A year later, Wrenn made a discovery: a material witness order in the trial file. It was signed by Shaban. It authorized Salcedo’s arrest. Wrenn left a copy for her supervisor, Jane Meyers.

“I found a material witness order for Salcedo, who was too afraid to testify, in the files,” Wrenn wrote to Meyers in an email. “I put it on your desk.”

But the office did nothing. It did not turn the order over to Quezada. It did not amend its response to Quezada’s appeal. It’s unclear if Meyers or Wrenn informed Shaban, although the office today maintains that they did not. Meyers, who retired several years ago, did not respond to requests for comment.

For another seven years, the office insisted it had no knowledge of any material witness order. Wrenn, Shaban and Meyers all appeared at appeal hearings about Quezada, but did not mention the discovery of the order.

At last, in 2011, with a federal court considering Quezada’s effort for a new trial, Wrenn produced the order. She said nothing about the fact that she’d known of it for years. And she argued in court papers that its existence should have no impact on Quezada’s appeal.

“The issues about the material witness order and Salcedo’s stay at a hotel during his trial testimony are moot,” she said. “Because the State is voluntarily disclosing those documents.”

She went on to argue that a state judge had already rejected Salcedo’s recantation once during Quezada’s previous appeal and therefore there was no need for a federal court to review it again.

Quezada pressed on, and in 2013 a federal judge ordered the state court to again review his claims based on Shaban’s conduct at trial.

“It’s just curious to me that, that the material witness order wasn’t disclosed,” Judge Kiyo Matsumoto said.

A full two years later, in the spring of 2015, Quezada’s lawyers got to question Wrenn and Shaban under oath and in open court. Wrenn disclosed nothing about having first found the order in 2004.

“Do you know who first located the Material Witness Order for Mr. Salcedo, that you produced on January 28, 2011?” a lawyer for Quezada asked Wrenn.

“I did,” she answered.

“Where did you find it?” she was asked.

“Somewhere in the files.”

“What files did you find them in?”

“Well, in the trial file.”

“Prior to January 28, 2011, had you previously searched through those trial files?”

“Yes.”

“Had you located the Material Witness Order for Mr. Salcedo?”

“No.”

“At any prior time?”

“No.”

In his testimony, Shaban said that he, in accordance with policy at the time, would not disclose the existence of a material witness order to a defense lawyer prior to the witness being found. And he said he would not turn the order over to the defense after the witness had been located. (The Brooklyn District Attorney’s office said it has since changed that policy.)

The judge conducting the hearing pressed Shaban to say whether he would in any way inform the defense that he had employed a material witness order to compel a prosecution witness to testify. Repeatedly frustrated, the judge at one point said:

“The question that’s being asked, sir, is a very simple question. The question that’s being asked is would you disclose the existence of a material witness order when a witness is brought in pursuant to that order? You already indicated that you don’t disclose it before they’re brought in. The question that’s being asked is whether or not you would disclose the existence of the material witness order when, in fact, the witness has been brought in? Yes or no.”

“I can’t say yes or no,’ Shaban answered.

Shanies, one of Quezada’s lawyers, then took his turn.

“Mr. Shaban, did you ever disclose to the defense at Mr. Quezada’s trial the fact that Sixto Salcedo was being held in custody by the D.A.’s office’s detective investigators?”

“I cannot specifically recall that.”

“Did you ever tell defense counsel that the detective investigators had held Mr. Salcedo overnight in hotel custody?”

“I don’t recall.”

Shaban then testified that in the years that followed, as Quezada mounted his appeals, he simply could not remember if he’d executed a material witness order on Salcedo. He couldn’t remember when asked about it in 2003; he couldn’t remember it in 2006 as he cross-examined Salcedo during a hearing about Salcedo’s recantation; he couldn’t remember it, he said, until he was shown a copy of it with his signature in 2011.

He was then asked if, at any time during Quezada’s years of appeals, he had ever himself attempted to determine if there had been a material witness order used.

“What steps, if any, did you take personally to find out whether there was, in fact, a material witness order for Mr. Salcedo in 1993?” Shanies asked.

“I did not take any steps,” Shaban said.

A quarter century after Quezada launched his first appeal, the district attorney’s office on Aug. 31 abandoned its defense of Quezada’s conviction. A recent search of the office’s records had turned up Wrenn’s 2004 email to her supervisor. It seemed clear Quezada was going to be granted a new trial. And no new case could be made without Salcedo, who had long ago recanted.

“Since we can’t try this case, we will no longer object to his release,” Thompson said in a press statement.