NEW YORK (AP) — A federal judge barred the general public and media from a courtroom Tuesday where defense lawyers claim emotional testimony from victims has spoiled the death penalty phase of the trial of a man who admits that he killed eight people on a bike path on behalf of a terrorist group.

Judge Vernon S. Broderick issued the edict Friday at the trial of Sayfullo Saipov through a court spokesperson, who wrote that courtroom seats would only be available to witnesses or parties considered essential to the trial. The judge announced late Tuesday that a few reporters might be allowed at the trial Wednesday on a “bench all the way in the back” of the courtroom.

The public and the media were excluded from the courtroom in part to make room for Saipov’s family members and numerous victims and family members of those who were killed. Victims have attended the trial for weeks, providing tearful testimony about how their lives have changed.

Saipov last month was convicted of killing eight people on Oct. 31, 2017, by driving a rented truck over the bike path along the Hudson River at a high rate of speed. Afterward, prosecutors said, he asked to hang a flag for the Islamic State group in his hospital room while he recovered from a police officer shooting him.

After hearing witnesses over what is expected to be a two-week period, the jury that convicted him will decide whether he gets death or life in prison. If any of them vote against death, he will automatically serve life in prison.

The judge directed the public and the media to watch the trial on television monitors elsewhere in the courthouse. Those monitors, however, show only a sliver of the courtroom and rely on lawyers, witnesses and the judge speaking into microphones and on court personnel remembering to switch on video and audio.

The monitors also do not enable members of the media to observe the courtroom reactions of Saipov’s family members or the victims and family members of those who died.

Their reactions, along with those of witnesses, grew in relevance after defense lawyers argued Friday in court papers that a mistrial should be declared because the volume of emotional testimony seems designed to make jurors choose a death sentence out of anger or spite or to prevent Saipov from communicating with his children, since those he killed can no longer speak with theirs.

The likelihood of emotional reactions by spectators was anticipated to be so high that Broderick warned them Tuesday that they should leave the courtroom if they become too emotional. Members of the media would be unable to know if anyone walked out.

The interest in impartial observers to the court proceeding was noted when defense lawyers asked the judge in their letter Friday to request that court stenographers preserve any audio recordings they routinely make to aid their work. Prosecutors called the request unprecedented and opposed it. A recording, though, would aid judges on appeal as they review how emotional testimony became.

Letters were filed in the case Tuesday to protest the exclusion of media from the courtroom.

In a letter joined by The Associated Press, New York Times attorney Dana Green urged the judge to recognize that a live video feed providing a narrow view of the courtroom was not an adequate substitute for being in the courtroom. She urged the judge to allow at least a small number of seats for a press pool. The New York Post and the Daily News also supported the request.

In a separate letter, Matthew Russell Lee of the Inner City Press noted that the presence of the media was “particularly important in capital cases.”

Broderick’s order banning the public and the media was believed to be a first for a public terrorism trial involving Islamic extremists in Manhattan federal court since the trials began months after the Feb. 26, 1993, World Trade Center bombing that killed six people and injured more than 1,000 others.