District prosecutors ran criminal background checks on several potential jurors in a high-profile gang case, raising serious concerns from a judge who questioned why most people they selected were African American.

The comments by D.C. Superior Court Judge Lynn Leibovitz came in the recent case of suspected gang members accused of murder, assault and conspiracy. The judge questioned how prosecutors selected those who were given extra scrutiny and ordered them to work through the night to conduct checks on the entire pool of 60 possible jurors.

“The focus here is not on whether you had a right to do an investigation of jurors but whether it should be selective as to race,” Leibovitz, a former D.C. prosecutor, said in court.

Most prosecutors around the Washington area, including those in Fairfax, Prince George’s and Montgomery counties, said they do not run criminal checks on would-be jurors. Arlington County prosecutors said paralegals there run checks on all potential jurors — a practice started more than a decade ago after a convicted felon was seated on a jury. The Alexandria commonwealth’s attorney said such checks are run only in cases in which authorities think they recall the person from a prior case.

Vincent M. Sutherland, senior counsel with the NAACP’s Legal Defense and Educational Fund, called what prosecutors did in the case “troubling.”

“If you subject one person to this type of treatment, you have to subject everyone to it. It sends a bad message. Even if the prosecutor had no malicious intent, it smells bad, to say the least,” he said. “When people hear about stories like this, it gives chilling effects on people who want to serve on juries and it breeds mistrust with respect to law enforcement and prosecutors.”

Prosecutors initially said they conducted the checks on seven potential jurors, all of whom were African American, according to a transcript of the November jury selection. They later said the inquiries were done on 18 people, 13 of whom are African American.

Assistant U.S. Attorney Emily Miller told the judge that some of the people were lifelong D.C. residents who had failed to answer a question on a court form about whether they had prior arrests. She also said that in some cases the prosecution had an “instinct or judgment” about the would-be juror. Prosecutors said some of those people had failed to reveal past arrests on charges including prostitution and drug possession — but none had felony convictions that would have disqualified them from serving, and in some cases prosecutors had dropped the charges.

Defense lawyers questioned the racial makeup of the group and said it was unfair that prosecutors used databases that aren’t publicly available.

Leibovitz ultimately found that there was no racial bias but cautioned prosecutors that “the question about how you select whom you check is one that arose in this case and obviously is one that you ought to be giving thought to in the office in the future.”

The judge ordered prosecutors to share the background checks done on all 60 possible jurors with defense lawyers.

Under D.C. law, convicted felons are disqualified from jury service until 10 years have passed since the completion of their sentence, including probation or parole. People called for jury duty in D.C. Superior Court fill out a form that includes questions about their criminal record. During the selection process, prosecutors, defense lawyers and the judge can ask the potential jurors about any knowledge they may have of the case or the defendants, witnesses or lawyers involved.

Orin Kerr, a professor at George Washington University’s law school, said that the law dictates which convictions bar someone from jury service and that the checks suggest that lawyers may be rejecting people based on other run-ins with the law.

“It troubles me. We have laws as to when jurors can serve on a jury based on their prior conviction,” Kerr said. “Prosecutors want to keep people off if they have a criminal record. You have a de facto expansion of rules on jury service. Those rules should be settled by city council and state legislators, not prosecutors.”

Former U.S. attorney Jeffrey A. Taylor, who served as head of the office from 2006 through 2009, said he did not recall any of his prosecutors doing criminal background checks on jurors. Still, Taylor said he would not have had a problem with the inquiries as long as the prosecutors had the time to do checks on all of the jurors and not just a few. “But you have to have a justifiable reason, other than a hunch, that someone is lying to you to do it,” Taylor said.

In a statement, the U.S. attorney’s office defended its prosecutors and said it “seldom” conducts criminal background checks but chose to do so in the gang case because the defendants are accused of involvement in a variety of criminal activity.

“We conducted criminal background checks on a diverse set of prospective jurors — white and black, women and men — to determine whether they had told the court the truth about their contacts with the criminal justice system,” according to the statement. “We learned that a number of prospective jurors had not been truthful with the court and failed to disclose convictions and arrests for offenses like carjacking, assault with a deadly weapon and handgun possession. On the basis of the information that had been withheld, the court excluded some of those individuals from serving on the jury.”

“Targeting people based on race is inexcusable,” the statement said. “If it ever came to our attention that this occurred, we would not tolerate it.”

Scott Burns, executive director of the National District Attorneys Association, said he never heard of prosecutors using government databases to do criminal background checks on prospective jurors but knew of cases in which they used Google or Facebook to gather information.

Burns said that he understands running the criminal checks if the police or prosecutors had information that a potential juror was lying about his or her criminal history but that “it should be disclosed to the jurors, defense attorneys and the judge.”

The D.C. trial involves four co-defendants who are alleged members of a Northwest Washington street gang called the 14th and Girard Crew of Northwest. Robert Givens, Lester Williams, Keir M. Johnson and Marcellus E. Jackson are charged with more than 80 counts, including murder, conspiracy and assault in connection with crimes in Columbia Heights and along the U Street corridor.

District residents called for jury duty in other cases seemed split on the issue. “So I am fulfilling my civic duty, coming down here, waiting in line, and I say that I don’t have any arrests, and you don’t believe me and run my criminal history anyway. That’s not fair,” said Susan Vasquez, 44, of Northeast, who was not seated on a jury.

But others said that in the Internet age, background searches are being done all the time. “If it’s public information, I wouldn’t have a problem with it. I can understand why they do it. If I were an attorney on the case, I’d do it, too,” said Robert vom Eigen, 68, of Georgetown, who also was not selected for a jury.

The gang trial was delayed by a day or so, and a new panel of jurors was called. The trial is proceeding. None of the 18 people on whom background checks were initially conducted were seated on the jury.

Lynh Bui, Justin Jouvenal, Ann Marimow, Dan Morse and Rachel Weiner contributed to this report.