This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

FORT LAUDERDALE, Fla. (AP) — Nikolas Cruz pleaded guilty to murder on Wednesday in the 2018 high school massacre in Parkland, Florida, that left 17 dead.

Cruz, 23, entered his pleas in a courtroom attended by a dozen relatives of victims after answering a long list of questions from Circuit Judge Elizabeth Scherer aimed at confirming his mental competency. He was charged with 17 counts of murder and 17 counts of attempted first-degree murder for those wounded in the Feb. 14, 2018, attack at Marjory Stoneman Douglas High School in Parkland, located just outside Fort Lauderdale.

A penalty trial will determine if Cruz will receive a sentence of death or life in prison without parole. Scherer plans to begin screening jurors next month in hopes testimony can begin in January.

His attorneys announced his intention to plead guilty during a hearing last week.

Fred Guttenberg, whose 14-year-old daughter Jaime died in the shooting, said he visited her grave this week to ask her for the strength to get through Wednesday’s hearing.

“She was the toughest, wisest person I ever knew,” he said. “My daughter always fought for what was right. My daughter despised bullies and would put herself in the middle of someone being bullied to make it stop.”

The guilty pleas will set the stage for a penalty trial in which 12 jurors will determine whether Cruz should be sentenced to death or life in prison without parole. Given the case’s notoriety, Scherer plans to screen thousands of prospective jurors. Hearings are scheduled throughout November and December, with a goal to start testimony in January.

Cruz killed the 14 students and three staff members on Valentine’s Day 2018 during a seven-minute rampage through a three-story building at Stoneman Douglas, investigators said. They said he shot victims in the hallways and in classrooms with an AR-15 semiautomatic rifle. Cruz had been expelled from Stoneman Douglas a year earlier after a history of threatening, frightening, unusual and sometimes violent behavior that dated back to preschool.

The shootings caused some Stoneman Douglas students to launch the March for Our Lives movement, which pushes for stronger gun restrictions nationally.

Since days after the shooting, Cruz’s attorneys had offered to have him plead guilty in exchange for a life sentence, saying that would spare the community the emotional turmoil of reliving the attack at trial. But longtime Broward State Attorney Mike Satz rejected the offer, saying Cruz deserved a death sentence, and appointed himself lead prosecutor. Satz, 79, stepped down as state attorney in January after 44 years, but remains Cruz’s chief prosecutor.

His successor, Harold Pryor, is opposed to the death penalty but has said he will follow the law. Like Satz, he never accepted the defense offer — as an elected official, that would have been difficult, even in liberal Broward County, where Democrats outnumber Republicans by more than 2 to 1.

By having Cruz plead guilty, his attorneys will be able to argue during the penalty hearing that he took responsibility for his actions.