(FORT LAUDERDALE, Fla.) — Jury selection in the death penalty case of confessed Parkland school shooter Nikolas Cruz lapsed into disarray after potential jurors allegedly mouthed expletives and threats to the defendant in the courtroom and the presiding judge admitted committing a legal error that nearly derailed the process.

Just days after Judge Elizabeth Scherer granted a motion by prosecutors to scrap jury selection in the high profile case and start from scratch, she reversed her order on Wednesday upon hearing a counter argument from Cruz’s lawyers. The case began on April 4 in Broward County, Florida.

Scherer admitted that she made an error back on April 5, the second day of jury selection, when she asked would-be jurors if they could follow the law if picked to serve on the case and then dismissed 11 who said they could not.

David Weinstein, a former federal and state prosecutor in Florida, told ABC News on Thursday that Scherer made a mistake by asking the question. He said her inquiries in the initial phase of jury selection should have been limited to questions about whether the potential jurors had a hardship that prevented them from serving on the case, which is expected to last four to six months.

“That was all that they were supposed to be inquiring into,” said Weinstein, who is not involved in the case but is following it closely.

He said the more probing questions like the one the judge asked should have been reserved for the voir dire phase of jury selection, when prosecutors and defense attorneys are given the chance to grill jury candidates on their answers.

“Each side is given the opportunity to rehabilitate you, to ask, ‘When you said you couldn’t follow the law, did you really understand what the judge was asking you? What do you mean you can’t follow the law?"” Weinstein said.

Defense attorneys filed a motion accusing the court of committing double jeopardy and asked that the death penalty phase of the case be declared a mistrial and that Cruz be sentenced to life in prison without the possibility of parole.

To remedy her mistake, Scherer reversed her earlier ruling and ordered that the 11 jurors she dismissed to be summoned back to court on Monday so lawyers can question them about their answers.

In her earlier ruling, Scherer also said she was dismissing the 243 would-be jurors who had already been qualified for a pool to seat the jury from. That decision has also been reversed.

Scherer said 20 jurors, including eight alternates, will eventually be chosen to recommend whether the 23-year-old Cruz, who has pleaded guilty to 17 counts of murder and 17 counts of attempted murder, will be sentenced to death or to life in prison without the possibility of parole.

The judge’s mistake wasn’t the only controversy to erupt this week in the case.

On Tuesday, a potential juror disrupted the proceedings when he entered the courtroom and allegedly mouthed expletives and threats to Cruz, who was seated at the defense table. The outburst apparently inspired other would-be jurors in the courtroom to make similar threats to Cruz and prompted bailiffs to press Cruz against a wall to protect him.

Scherer described that particular group of jury candidates as “belligerent” and dismissed them all.

Cruz pleaded guilty in October to committing the 2018 Valentine’s Day massacre at Marjory Stoneman Douglas High School in Parkland, Florida. During the hearing attended by loved ones of the 17 he killed, Cruz said he wished it was up to the survivors of the shooting to determine whether he lived or died.

“I’m very sorry for what I did,” Cruz said at his plea hearing. “I can’t live with myself sometimes.”

Copyright © 2022, ABC Audio. All rights reserved.