A courtroom will be closed to the public when a undercover New York City detective testifies in a gang murder and drug case, to protect both the detective and the integrity of undercover operations, a judge has ruled.

Southern District Judge Paul Engelmayer (See Profile), over the objection of defendants Carlos Urena and Limet Vasquez, issued a mid-trial order and opinion Monday saying all but the defendants’ family members will be kept out of the courtroom.

The judge granted the request of the Southern District U.S. Attorney’s office in United States v. Urena, 11 Cr. 1032, but only because the government made a substantial showing about the safety and effectiveness of the detective and proposed three different measures to reduce the impact of the closure—including allowing the public to hear the testimony by live audio feed in a separate room of the courthouse at 40 Foley Square, courtroom 110.

Urena and Vasquez are alleged members of the Bronx Trinitarios Gang who are accused of racketeering, large-scale narcotics trafficking and multiple murders. They are just two out of more than 119 people charged in a series of sweeps that began in 2009 to disable what U.S. Attorney Preet Bharara has called “a highly organized criminal machine” that has turned “portions of New York City into a virtual shooting gallery.”

Urena is represented by Gregory Cooper, Vasquez by Don Buchwald, David Glazer and Alina Mejer. The prosecution team includes Assistant U.S. Attorneys Micah Smith, Ryan Poscablo and Timothy Sini.

The trial began March 10. So far, three of seven cooperating witnesses have testified as part of evidence that includes phone wiretaps, controlled buys of guns and narcotics, and the testimony of the undercover detective, referred to only in the judge’s opinion as UC-188.

UC-188′s testimony is “not game-changing,” the judge said in his order and opinion, as the detective is taking the witness stand to corroborate “substantial evidence of narcotics and firearms trafficking” by Trinitarios members in the Bronx that is already in evidence or that the government has said it will offer.

Courtroom closures are governed mainly by Waller v. Georgia, 467 U.S. 39 (1984), where the U.S. Supreme Court laid out a four-part test for closing a public trial: “1) The party seeking to close the hearing must advance an overriding interest that is likely to be prejudiced; 2) The closure must be no broader than necessary to protect that interest; 3) The trial court must consider reasonable alternatives to closing the proceeding; and 4) The trial court must make findings adequate to support the closure.

Closures also have been the subject of intense litigation before the U.S. Court of Appeals for the Second Circuit, which has issued several rulings on the issue and twice sat en banc to consider the closing of part of a trial to the public.

Here, prosecutors made a strong case for shielding UC-188, one of only eight members of the Gang Squad of the Organized Crime Control Bureau of the New York City Police Department, arguing that his safety and the safety of fellow Gang Squad detectives could be jeopardized if gang members or their minions were allowed to walk into a courtroom and see him testify from the stand.

Having made that argument for closure, the prosecution offered to reduce what the judge called the “harmful effects” of excluding the public—the audio feed to another room, the prompt release of transcripts of UC-188′s testimony to the public and permitting the defendants’ families to remain in the courtroom.

“This last step is particularly significant—if not required outright —under Second Circuit case law,” Engelmayer said.

The judge was referring to a line of cases over courtroom closures that include Smith v. Hollins, 448 F.3d 533, where the Second Circuit held in 2006 that the right to a public trial was violated when a state trial judge instructed some family members of a narcotics defendant to sit behind a screen so they could not see the faces of undercover drug officers who were testifying (NYLJ, May 18, 2006).

Engelmayer considered other options, including having the undercover wear a disguise or placing a screen between the witness and courtroom spectators, but he said “these alternatives would be materially more problematic and harmful than the proposal for a limited closing of the courtroom.”

The judge also cited Ayal v. Speckard, 131 F.3d 62 (2d Cir. 1997), where the circuit, sitting en banc, said that “disguising the witness risks lessening the jury’s opportunity to observe the witness’s demeanor and assess credibility, and a screen risks implying to the jury that the family or friends of the defendant in attendance are likely to be dangerous.”

The circuit also sat en banc in 2011 to consider the closing of the courtroom during jury selection in the immigration fraud case of United States v. Gupta, 09-4738-cr (NYLJ, Dec. 15, 2011). The full court never had to issue an opinion, however, as the original panel reversed itself in 2012 and found the Sixth Amendment trial rights of immigration attorney Raghubir Gupta were violated by the closure.

On Monday, Engelmayer said “the government’s proposal is the best available option for shielding the identity and protecting the safety of UC-188, while limiting, to the extent possible, any infringement on the defendants’ right to an open trial.”

The government also asked that UCC-188 be allowed to testify without giving his true name.

Again, the judge said the safety of the witness and “his viability as an undercover asset overwhelmingly outweighs the defendants’ interest in public disclosure of his true name.”

But the judge agreed with the defense and rejected the government’s bid to have UC-188 testify under a transparent code name, such as UC-188.

Allowing that, the judge said “might unhelpfully imply to the jury that defendants are dangerous,” so, instead, he will allow UC-188 to testify under an alias, while his real identify will be disclosed to defense counsel under the terms of a protective order.

This measure will allow defense counsel to investigate UC-188, without his true identity being revealed to alleged gang members.

The trial is expected to last about six weeks.