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.

SAN DIEGO — In the opening hours of the Poway synagogue shooting trial, the courtroom heard from a congregant who confronted the gunman face-to-face, and from the officer who arrested suspected shooter John Earnest after he called 911 to reveal his identity and location.

Thursday’s hearing was held to determine whether Earnest will stand trial on charges that could carry the death penalty. He’s accused of opening fire in the worship center, killing one congregant and injuring several others.

The 20-year-old faces murder and attempted murder charges for the April 27 shooting rampage at Chabad of Poway. He’s also charged with arson for the March 24 blaze at the Dar-ul-Arqam Mosque, also known as the Islamic Center of Escondido.

Prosecutors say Earnest admitted to both the shooting and the mosque fire in an online open letter in which he espouses anti-Semitic sentiments and a need to protect the “European race.”

Earnest had a stone cold-glare in court Thursday as prosecutors played surveillance footage of the shooting. The video shows the gunman going into the synagogue with a rifle drawn. Inside the lobby, 60-year-old Lori Gilbert Kaye is standing by a table with Rabbi Yisroel Goldstein a few feet away. When the gunman enters, Kaye is immediately shot. The rabbi runs and is wounded, along with a 34-year-old man and his 8-year-old niece.

Oscar Stewart, a 51-year-old electrician and military veteran, was the first person from inside the synagogue at the time of the attack to testify Thursday. He recalled the congregation’s panic when gunfire suddenly broke out in the building, and then running outside and confronting the shooter.

Stewart said he recognized the gunshots instantly from his time serving in Iraq. As people scrambled to exit, falling over each other, “it was chaos,” Stewart said. “I heard screaming … people yelling to get down.”

Stewart said he ran toward the lobby because “that was where the gunfire was coming from,” screaming for people to get down and get out as he searched for the gunman. Eventually he made it to the door, where Stewart saw a young man firing a rifle outside.

“He’s sitting right there,” Stewart told an attorney, gesturing to Earnest when he was asked to identify the shooter in court.

Stewart testified that he screamed at Earnest as he fiddled with his weapon, trying to release the magazine. He said he was trying to distract or confuse the shooter by yelling at him, saying that he was going to kill him and using “profanities.”

Stewart testified that’s when Earnest dropped his weapon to his side, turned and ran, hopping in a car. Stewart ran up to the side of the car, punching it, but fell back when another man shouted to him that he had a gun and was going to open fire. As Earnest sped away, Stewart recalled trying to memorize the vehicle’s license plate.

The man who opened fire was an off-duty Border Patrol officer — he fired but did not hit Earnest as he fled.

Police said Earnest called 911 a short time later, taking responsibility for the attack.

In a recording played in court Thursday, Earnest told a dispatcher, “I just shot up a synagogue. I’m just trying to defend my nation from the Jewish people … They’re destroying our people … I opened fire at a synagogue. I think I killed some people.” He added that he shot up the synagogue “because the Jewish people are destroying the white race.”

A San Diego police officer who was headed to the synagogue spotted the Earnest’s Honda Civic and pulled up behind him over less than two miles west of the synagogue, authorities said. That officer testified Thursday, saying Earnest gave himself up without struggle. The suspected gunman’s first words to the officer were, “How’s your day going,” the officer testified.

In the “open letter” that authorities say Earnest posted online shortly before the shooting, the author wrote that he spent four weeks planning the attack, citing his “disgust” for Jews and a desire to kill them, and expressed admiration for the Australian white nationalist who attacked two mosques in Christchurch, New Zealand, in March, killing 50 people.

The writer also claimed responsibility for the March 24 blaze, which was quickly extinguished by people inside the mosque. Graffiti left on the building made reference to the mosques attacks in Christchurch.

After hearing the evidence, Presiding Judge Peter C. Deddeh will rule whether Earnest will stand trial on the charges, including a special circumstance hate crime allegation that could lead to the death penalty. The San Diego County District Attorney’s Office has not yet decided whether to pursue capital punishment.

In addition to the state case, Earnest also faces more than 100 federal counts related to hate crimes, and could also face the death penalty in the federal case.