The trial of the Parkland school shooter turned into a screaming match Wednesday when lawyers for the Florida school shooter unexpectedly rested their case before calling all of their witnesses.

Attorneys for Nikolas Cruz called just 25 of the 80 witnesses they initially told the judge and prosecutors would testify in his death penalty trial. He earlier pleaded guilty to killing 14 students and three teachers.

The announcement after 11 days of testimony led to a shouting match between Circuit Judge Elizabeth Scherer and lead defense attorney Melisa McNeill.

The judge criticized McNeill for resting the case without warning her or the prosecution. The judge said the decision was "the most uncalled for, unprofessional way to try a case."

Prosecutors told the judge they were not ready to immediately resume the trial.

"We're waiting for 40 more witnesses," lead prosecutor Mike Satz said.

The judge said the move was an unnecessary inconvenience for the 12 jurors and 10 alternates as well for court staff.

"Even if you didn't make your decision until this morning, to have 22 people, plus all of the staff and every attorney, march into court and be waiting as if it's some kind of game – now I have to send them home," Scherer said. "The state's not ready, they're not going to have a witness ready. We have another day wasted."

McNeill replied: "You are insulting me on the record in front of my client, and I believe that I should be able to defend myself."

Scherer responded McNeill's behavior has been questionable since the start of the trial.

"You've been insulting me the entire trial, blatantly. Taking your headphones off, arguing with me, storming out, coming late intentionally if you don't like my rulings," the judge said. So, quite frankly, this has been long overdue."

The judge asked Cruz if he understood his lawyer's decision to rest its case and that no more witnesses would be taking the stand.

Cruz earlier pleaded guilty to fatally shooting 14 students and three staff members on Feb. 14, 2018 at Marjory Stoneman Douglas High School. The trial will determine whether he receives the death penalty or is sentenced to life without parole.

Prosecutors could begin their rebuttal as soon as Sept. 27, however, closing arguments can start as early as Oct. 10, according to Scherer.

GettyImages-918690996
Nikolas Cruz, 19, a former student at Marjory Stoneman Douglas High School in Parkland, Florida, where he allegedly killed 17 people, is seen on a closed circuit television screen during a bond hearing in front of Broward Judge Kim Mollica at the Broward County Courthouse on February 15, 2018 in Fort Lauderdale, Florida. Susan Stocker - Pool/Getty Images