NEW YORK (AP) — A judge on Thursday refused to release testimony heard by a grand jury that declined to indict a police officer in the chokehold death of Eric Garner, finding he hadn’t heard a valid reason to make the secret information public.

The New York Civil Liberties Union and others had asked the court to order Staten Island District Attorney Daniel Donovan to release the grand jury transcript, including the testimony of the officer involved, Daniel Pantaleo, and dozens of witnesses, detailed descriptions of evidence and other documentation. A similar step was voluntarily taken by the prosecutor in Ferguson, Missouri, when a grand jury there refused to indict an officer in the fatal police shooting of 18-year-old Michael Brown.

Both Garner and Brown were black; the officers involved are white. The deaths sparked nationwide protests about the treatment of communities of color by law enforcement and a debate about the role of race in policing.

The effort to make the Garner grand jury record public had been considered a longshot given that New York laws explicitly bar disclosure absent a court order. But the decision also comes amid a debate over whether the laws should be revised to provide more transparency in the process, particularly when it involves police shootings.

Civil liberties lawyers had argued that the public needs to reconcile the widely watched video of Garner’s July 17 death with the decision not to indict the officer involved.

But State Supreme Court Justice William Garnett wrote that the law required the NYCLU and the other parties who brought the lawsuit to establish a “compelling and particularized need” to release the grand jury minutes.

“What would they use the minutes for? The only answer which the court heard was the possibility of effecting legislative change,” he wrote. “That proffered need is purely speculative and does not satisfy the requirements of the law.”

The decision by the Staten Island grand jurors, he added, “was theirs alone, after having heard all of the evidence, having been instructed on law and having deliberated. Their collective decision should not be impeached by the unbridled speculation that the integrity of this grand jury was impaired in any way.”

Donovan argued that the disclosure would damage the credibility of prosecutors seeking to assure both grand jurors and witnesses that details of their participation would be kept from public view. Following the grand jury’s decision in December, he asked a partial disclosure of details like the number of witnesses but not testimony or exhibits shown to jurors.

The judge also agreed with arguments by Donovan’s office that secrecy was needed to assure witnesses that they would not be subjected to public criticism for their cooperation.

“This concern is particularly cogent in ‘high publicity cases’ where the witnesses’ truthful and accurate testimony is vital,” Garnett wrote. “It is in such notorious cases that witnesses’ cooperation and honesty should be encouraged — not discouraged — for fear of disclosure.”

Donovan said Thursday his office would respect “and will adhere to Judge Garnett’s well-reasoned decision.”

The parties, which also include the Legal Aid Society, Public Advocate’s office, New York Post and the NAACP, are appealing.

The NYCLU’s legal director, Arthur Eisenberg, said the civil rights agency was disappointed that the court “has chosen to perpetuate secrecy rather than promote transparency.” He said, “In doing so, the court has reinforced the distrust many New Yorkers already feel toward the performance of the criminal justice system in this case.”

Pantaleo and other officers had stopped Garner on suspicion of selling loose, untaxed cigarettes. A video shot by an onlooker shows Garner telling the officers to leave him alone and refusing to be handcuffed. Pantaleo responded by wrapping his arm around Garner’s neck in what he said was a sanctioned takedown move and not a banned chokehold. The heavyset Garner, who had asthma, is heard on the tape gasping, “I can’t breathe.” He loses consciousness and died later at a hospital.

Attorney Jonathan Moore, who represents Garner’s family, said they were disturbed by the ruling.

“We think this grand jury process was deeply flawed,” he said. “We think the ability for the public to see what that process was like would have been an important step in understanding what happened here.”

The Rev. Al Sharpton, who has called for a federal prosecution of the officer, also criticized the decision.

“If a video of a man being choked and saying 11 times ‘I can’t breathe’ was not enough to go to trial, only a release of the grand jury minutes could explain to us why it was not,” Sharpton said.