ANNAPOLIS, MD. -- Opening statements are scheduled for Tuesday in the second phase of a trial to determine whether the man who killed five people at a Maryland newspaper was legally sane at the time of the mass shooting.

Jarrod Ramos pleaded guilty to all 23 counts against him in October 2019, but he is contending he is not criminally responsible due to mental illness.

Judge Michael Wachs said during jury selection last week that a "vast majority" of the case will consist of testimony from mental health experts called by defense attorneys and prosecutors.

Opening statements are starting one day after the third anniversary of the Capital Gazette attacks that killed Wendi Winters, John McNamara, Gerald Fischman, Rob Hiaasen and Rebecca Smith.

The second part of the trial was initially set for November 2019, but the case was postponed. The trial was delayed again in February 2020 after one of Ramos' three public defenders left the case for medical reasons, pushing it back to June 2020. The pandemic delayed it further.

Under Maryland's insanity defense law, a defendant has the burden to show by a preponderance of the evidence that he is not criminally responsible for his actions. State law says a defendant is not criminally responsible for criminal conduct if -- because of a mental disorder or developmental disabilities -- he lacked substantial capacity to appreciate the criminality of his conduct.

If Ramos were found not criminally responsible, he would be committed to a maximum-security psychiatric hospital instead of prison. Prosecutors are seeking life without possibility of parole.

Ramos, 41, had a well-documented history of harassing the newspaper's journalists. He filed a lawsuit against the paper in 2012, alleging he was defamed in an article about his conviction in a criminal harassment case in 2011. The defamation suit was dismissed as groundless.