CLEVELAND, Ohio -- An undercover FBI agent will don a disguise and use a pseudonym in a partially-closed courtroom when testifying in a trial for a man charged with working to create a cell of Islamic State supporters to carry out violent acts in the United States.

The agent's identity must be protected when he takes the stand against Erick Jamal Hendricks in a federal courtroom in Akron because he is still working cases undercover, federal prosecutors said. To show his face to the public would put his and his family's safety at risk, as Hendricks and others have conducted countersurveillance to detect undercover law enforcement, the government argued.

U.S. District Judge John Adams agreed, imposing nearly all the safety measures requested by prosecutors for the agent's testimony, which is expected take place sometime this month. Jury selection for Hendricks' trial began Friday. The trial could last up to three weeks.

An order issued Wednesday says the agent will testify under a pseudonym, wear a "light disguise, such as changing ... facial hair, hairstyle, or dress style" and is allowed to enter the courthouse through an entrance not available to the public.

Only the judge, jury, defendant, his attorneys, the government's team and essential court staff will be allowed in the courtroom during the agent's testimony, the judge ordered. Spectators can listen to an audio feed of the testimony in a separate room in the courthouse. They will not be able to see the agent.

Adams noted that he may allow Hendricks' close family in the courtroom while the agent testifies.

Hendricks, 37, of North Carolina is charged with conspiring to provide support to ISIS. Federal prosecutors say his mission was to recruit and train ISIS sympathizers in the U.S. to carry out attacks. He vetted people to see if they were suitable to join his cell and told others to vet more possible recruits through social media, authorities say.

A large part of the government's case centers on Hendrick's alleged connection to one of two gunmen who opened fire at "The First Annual Muhammad Art Exhibit and Contest" in Garland, Texas in May 2015. Elton Simpson and Nadir Hamid Soofi wounded a security guard before police shot and killed them.

The undercover agent is expected to testify that he spoke to Hendricks through social media and that Hendricks connected Simpson and the agent. Hendricks also directed the agent travel to Garland, which is northeast of Dallas, because of the contest. Once there, Hendricks asked the undercover agent about security measures at the event, according to court records.

In addition to being in close to the exhibit around the time of the attack, the undercover agent was in communication with Simpson before Simpson and Soofi opened fire, filings show. An FBI affidavit filed in support of Hendricks' arrest in August 2016 noted that the agent, while talking to Simpson, told him to "tear up Texas" more than a week prior to the Garland art exhibit shooting.

The agent made the comment "in an effort to continue their dialogue," the affidavit says.

The measures the government requested and the judge allowed to restrict the public's ability to watch the undercover agent testify are unusual but not unprecedented. While the Sixth Amendment guarantees a defendant's right to a public trial, courts have taken unique steps in cases that involve law enforcement doing undercover work, especially in terrorism cases.

Judges across the country have approved measures similar to the ones Adams will impose or have taken other steps such as using a screen to shield an agent or informant's face from a courtroom's viewing gallery.

Hendricks' attorneys disputed some, but not all of the measures the judge ordered to limit access to the undercover agent's testimony.

They wrote in a Feb. 23 court filing that they did not think allowing the agent to testify under a pseudonym and with a light disguise was unreasonable.

However, closing the courtroom to the general public goes too far, the attorneys argued.

The public should be allowed to scrutinize court proceedings, they said. In addition, they argued that a defendant's interest in detecting law enforcement is not enough to restrict access, as defendants in many criminal cases are interested in evading authorities.

Hendricks' lawyers also argued that removing spectators would prejudice their client in the eyes of the jury.

"Excluding the entire public ... when the (agent) takes the stand would send the clear message that Hendricks is dangerous," the attorneys wrote.

Adams' order also says he will also allow an FBI informant to testify using a pseudonym. He will not close the courtroom for the informant's testimony, the order states.

The case is being tried here largely because Hendricks is accused of reaching out to a Northeast Ohio man on social media in order to get him to recruit others. The Ohio man told FBI agents that Hendricks tested his religious knowledge and commitment to ISIS, including asking whether he was willing to die as a martyr, court records say.

That man is believed to be Amir Al-Ghazi of Sheffield Lake, who bought an AK-47 assault rifle in June 2015 in pursuit of supporting ISIS. He paid an undercover FBI agent $400 for the rifle and pleaded guilty to federal charges in March 2016.

Revelations that the FBI had information about the men who attacked the art contest in Texas caused two Republican senators, Chuck Grassley and Ron Johnson, to press the agency for more information in 2017. The statuses of their inquiries were not immediately clear.

If you would like to comment on this story, please visit Friday's crime and courts comments section.