Defendant John Earnest listens during testimony by witness Oscar Stewart during Earnest's preliminary hearing, Thursday, Sept. 19, 2019, in Superior Court in San Diego. Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. (John Gibbins/The San Diego Union-Tribune via AP, Pool)

SAN DIEGO (AP) — A former college student will stand trial on charges he opened fire with an assault rifle inside a Southern California synagogue, killing one woman and injuring three people last April, a judge ruled Friday.

John T. Earnest had no reaction when San Diego Superior Court Judge Peter Deddeh ruled that a trial will proceed for Earnest on murder and attempted murder charges in the attack on the Chabad of Poway synagogue during services on the last day of Passover.

Earnest, 20, also will be tried on an arson charge for a fire at a nearby mosque that happened before the synagogue shooting.

Prosecutors on Thursday played a 12-minute recording of the gunman calmly telling a 911 dispatcher that he had just shot up a synagogue to save white people from Jews.

Earnest could face the death penalty if he is convicted of murder as a hate crime, although prosecutors haven't said whether they will pursue capital punishment.

The 911 recording was heard publicly for the first time at Thursday's dramatic hearing, which included playing of surveillance video of the shooting and a congregant describing how he confronted the gunman and chased him away.

"I'm defending our nation against the Jewish people, who are trying to destroy all white people," said the caller on the 911 recording who identified himself as Earnest.

He provided details of where he was waiting for police and promised to leave his AR-15 assault rifle on the passenger seat. He said he would get out of the car with a supply of bullets hanging on the chest of his vest, as if his surrender had already been planned.

Also at the hearing, Oscar Stewart spoke publicly for the first time about confronting Earnest as shots rang out from the lobby.

"People were falling over each other. It was chaos," he said. "I screamed (to everyone) 'Get down! Get out here.' "

Stewart, 51, was standing toward the back of the service when shots rang. He said he took three or four steps to flee and turned around for reasons he still can't explain.

"He was firing in front of me." Stewart said. "I was paying attention to the rifle."

As the gunman struggled to reload, Stewart said he relied on combat training to try to distract him from his plan of attack.

"I told him I was going to kill him," said Stewart, who served in both the Persian Gulf War in the 1990s and in Iraq after the 9/11 attacks.

Stewart walked across the street after the suspect fled, as shown in the surveillance video, and banged on the side of his car. He said he worried the shooter might attack a church next door or a grocery store down the street.

Stewart got out of the way after an off-duty Border Patrol agent at the service said from behind that he had a gun. The agent fired about five shots as the gunman drove away erratically.

Earnest also is charged with trying to burn down a mosque weeks earlier in nearby Escondido, where seven people on a spiritual retreat were sleeping. They awoke to flames and managed to extinguish the fire.

Outside the mosque, authorities say, the suspect had scrawled the name of a man accused of shootings at two mosques in New Zealand that killed 51 people earlier last spring.

This April 27, 2019 photo from surveillance video at the Chabad of Poway, shown as evidence in the preliminary hearing of John T. Earnest, shows what authorities say is Earnest beginning his rampage on the synagogue in Poway, Calif., in court in San Diego, Calif. on Thursday, Sept. 19, 2019. A woman was killed and three other people were wounded in the attack. Earnest has pleaded not guilty to murder, attempted murder and arson tied to a mosque fire. (Chabad of Poway/San Diego Superior Court via AP)
This April 27, 2019 photo from surveillance video at the Chabad of Poway, shown as evidence in the preliminary hearing of John T. Earnest, shows what authorities say is Earnest fleeing, in the street at top left, being pursued by Oscar Stewart, a combat veteran of Iraq and the first Gulf War, left center, after his rampage on the synagogue in Poway, Calif., in court in San Diego, Calif. on Thursday, Sept. 19, 2019. A woman was killed and three other people were wounded in the attack. Earnest has pleaded not guilty to murder, attempted murder and arson tied to a mosque fire. (Chabad of Poway/San Diego Superior Court via AP)
FILE - In this April 30, 2019 file photo, John T. Earnest appears for his arraignment hearing in San Diego.  Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. A preliminary hearing for Earnest begins Thursday, Sept. 18, 2019, in state court and is expected to last up to two days. (Nelvin C. Cepeda/The San Diego Union-Tribune via AP, Pool, File)
This April 27, 2019 photo from surveillance video at the Chabad of Poway, shown as evidence in the preliminary hearing of John T. Earnest, shows people diving for cover during during what authorities say is Earnest's rampage on the synagogue in Poway, Calif., in court in San Diego, Calif. on Thursday, Sept. 19, 2019. A woman was killed and three other people were wounded in the attack. Earnest has pleaded not guilty to murder, attempted murder and arson tied to a mosque fire. (Chabad of Poway/San Diego Superior Court via AP)
FILE - In this April 29, 2019 file photo, Yisroel Goldstein, Rabbi of Chabad of Poway, holds a yellow rose as he speaks at the funeral for Lori Kaye, who is pictured at left, in Poway, Calif. Prosecutors say John T. Earnest opened fire during the Passover service at the synagogue on April 27, killing Kaye and injuring three people, including the rabbi. A preliminary hearing for Earnest begins Thursday, Sept. 18, 2019, in state court and is expected to last up to two days. (AP Photo/Gregory Bull, File)
FILE - In this Sunday, April 28, 2019 file photo, a San Diego county sheriff's deputy stands in front of the Poway Chabad Synagogue in Poway, Calif. Prosecutors say John T. Earnest opened fire during a Passover service at the synagogue on April 27, killing one woman and injuring three people, including the rabbi. A preliminary hearing for Earnest begins Thursday, Sept. 18, 2019, in state court and is expected to last up to two days. (AP Photo/Denis Poroy, File)
Defendant John Earnest grins during testimony by witness Oscar Stewart during Earnest's preliminary hearing, Thursday, Sept. 19, 2019, in Superior Court in San Diego. Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. (John Gibbins/The San Diego Union-Tribune via AP, Pool)
Defendant John Earnest grins during testimony by witness Oscar Stewart during Earnest's preliminary hearing, Thursday, Sept. 19, 2019, in Superior Court in San Diego. Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. (John Gibbins/The San Diego Union-Tribune via AP, Pool)
John O'Connell, attorney for John Ernest, left, cross examines witness Oscar Stewart during a preliminary hearing for Earnest, Thursday, Sept. 19, 2019, in Superior Court in San Diego. Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. (John Gibbins/The San Diego Union-Tribune via AP, Pool)
Deputy District Attorney Leonard Trinh questions witness Oscar Stewart during a preliminary hearing for John Earnest, Thursday, Sept. 19, 2019, in Superior Court in San Diego. Prosecutors say Earnest opened fire during a Passover service at the Chabad of Poway synagogue on April 27, killing one woman and injuring three people, including the rabbi. (John Gibbins/The San Diego Union-Tribune via AP, Pool)