Tawanda Jones, center, and C.D. Witherspoon, right, chant at a rally with members of the Peoples Power Assemblies outside the Baltimore courthouse at Calvert during pretrial proceedings in the Freddie Gray case on Sept. 10, 2015. (Barbara Haddock Taylor/Baltimore Sun via AP)

A Baltimore judge’s order granting anonymity to the jurors who will decide whether a city police officer bears responsibility in the death of Freddie Gray Jr. marks the latest in what legal observers say is a growing phenomenon: Those who dole out justice in the country’s most sensitive cases sometimes do so without having to reveal their identities to the public.

Citing extensive publicity and asserting that those deciding the guilt or innocence of Officer William G. Porter could face “harassment,” Judge Barry G. Williams ordered Tuesday that the jurors’ names not be made public. Defense attorneys had requested the atypical move and asked that jurors be told specifically that they would be granted anonymity.

That, the attorneys argued, might put to rest people’s fears about serving in the emotionally charged case.

“In the current climate, saying ‘not guilty,’ regardless of the evidence or the lack thereof presented by the state, and then returning to your daily life will take great courage on the part of the citizenry,” Porter’s defense attorneys wrote. “It is possible, indeed probable, that an acquittal of Officer Porter will lead to further civil unrest. But this officer deserves his trial without any ‘sacrificial lamb’ thinking on the part of jury members.”

Prosecutors agreed that jurors’ names should not be made public but objected to a special instruction telling them their identities would forever be kept secret. As of Wednesday, the judge had yet to decide precisely how he would handle that portion of the defense’s request.

Porter, charged with involuntary manslaughter and other counts, is the first of six Baltimore police officers to go on trial in Gray’s death, which touched off unrest across the city.

Anonymous juries, although not new, are often controversial, pitting those who argue for a transparent judicial process against those who say that more practical concerns — such as juror safety and privacy — should take precedence. Judges have wide latitude to shield jurors’ names from disclosure (federal judges, for example, are permitted by federal statute to do so “where the interests of justice so require”), although practices vary from courthouse to courthouse and judge to judge, legal observers say.

Gregg Leslie, legal defense director for the Reporters Committee for Freedom of the Press, said the ruling in the Gray case illustrates “a really disturbing trend that we’re seeing a lot of.” He said that when jurors’ names are shielded from the public, it can be difficult or impossible to determine whether they might be affected by any improper biases or influences.

“Anonymous juries are almost never truly justified as a permanent solution,” Leslie said. “If secrecy becomes the norm, corruption will necessarily follow.”

Others take a different view. Baltimore County State’s Attorney Scott Shellenberger, whose office is not involved in the Gray case, was among those pushing the Maryland Court of Appeals to allow anonymous juries, which it did in 2011.

While Shellenberger said employing the practice is rare, he asserted that it is necessary when Facebook and other social-media sites make it easy to figure out where a juror lives, or where his or her children go to school.

“It’s a dangerous world out there,” Shellenberger said. “If you’re sitting in judgment in a gang-related murder, you want to know that you’re protected and there won’t be any chance of retaliation.”

Tracking just how frequently jurors are granted anonymity is difficult. The federal judiciary does not keep statistics on how often the practice is used. Leah Gurowitz, a spokeswoman for the D.C. Superior Court, said, “If it’s ever happened, it’s very rare” in the city courthouse of the nation’s capital. Representatives of the Maryland judiciary and Virginia Supreme Court did not immediately respond to messages seeking comment.

The first anonymous jury seems to have been used in a drug conspiracy case in New York in the late 1970s. In that case, authorities were concerned about possible retaliation against jurors or their family members. Legal observers say the grant of anonymity has been employed persistently since then in some of the nation’s most high-profile gang, terrorism and drug cases, but also in a number of less high-stakes matters and in instances in which judges felt that jurors deserved privacy from media inquiries.

An anonymous jury was used in the case of Adis Medunjanin, who was convicted of plotting to bomb New York City’s subway system, and in the case of Umar Farouk Abdulmutallab, known to most as the “underwear bomber.” Jurors were reportedly first given anonymity in D.C. federal court in 1989 in the trial of notorious drug gang leader Rayful Edmond III, who, at the time of his arrest, was reported to have controlled 20 percent of the city’s cocaine trade and run a network of enforcers linked to 30 killings.

In 2012, a federal appeals court panel affirmed a lower court’s decision to use an anonymous jury in a Baltimore narcotics case in which the killing of witnesses was an issue.

C. Justin Brown, a lawyer in that case who argued against having an anonymous jury, said the Gray case is somewhat different, in that the concern is not necessarily about those on trial.

“They’re probably trying to protect the jurors from people in the community who might react angrily to a verdict of not guilty,” Brown said, who is not connected to the Gray case. But one of Porter’s attorneys worked with Brown on the Baltimore narcotics case.

The jurors who acquitted the Los Angeles officers caught on tape beating Rodney King were anonymous. And, initially, so too were the jurors who acquitted George Zimmerman in the shooting death of 17-year-old Trayvon Martin, an unarmed black teenager whom Zimmerman confronted as the teen walked through a Florida neighborhood. The jurors’ names were later released after media outlets intervened.

Porter’s trial is scheduled to begin with jury selection Monday. A gag order bars prosecutors and defense attorneys from speaking to reporters about the case.

Lynh Bui contributed to this report.

Sign up for e-mail updates on the Freddie Gray case. We’ll e-mail you new Washington Post stories on the trial as they’re published.