A nursing student pleaded guilty on Tuesday to murder and other charges after shooting a gun inside the Chabad of Poway synagogue in California in April 2019.

By pleading guilty, John Earnest avoided the death penalty in San Diego Superior Court, reported the AP.

Earnest fired bullets at congregants on a Saturday morning during the last day of Passover, killing 60-year-old Lori Gilber-Kaye and wounding three others, including a child and the senior rabbi at the time, Yisroel Goldstein.

The district attorney’s office said: “While we reserved the option of trying this as a death-penalty case, life in prison without the possibility of parole for the defendant is an appropriate resolution to this violent hate crime, and we hope it brings a measure of justice and closure to the victims, their families, friends and the wider community.”