(CNN) - The man accused in the deadly Chabad of Poway synagogue shooting in California was armed with an AR-15 style rifle he legally purchased and dressed in a tactical vest with five additional 10-round magazines when he opened fire, prosecutors said Tuesday.
John T. Earnest, 19, could face the death penalty because he is accused of killing a woman because of her religious beliefs.
Earnest was arraigned in San Diego County Superior Court on charges that include one count of murder and three counts of attempted murder in connection with the shooting that left one woman dead and three other people injured.
His court-appointed public defender entered a not guilty plea on his behalf and denied the allegations.
Judge Joseph P. Brannigan granted prosecutors' request and ordered Earnest held without bail.
"Mr. Earnest is an obvious and extraordinary risk to public safety and to the community," the judge said.
Earnest appeared stone-faced standing behind a glass partition during the arraignment.
Suspect fired 8 to 10 rounds, prosecutors said
Earnest opened fire with his semi-automatic rifle in the synagogue's foyer, fatally striking 60-year-old Lori Gilbert Kaye twice and then wounding Rabbi Yisroel Goldstein, according to San Diego County Deputy District Attorney Leonard Trinh.
Earnest then turned the rifle towards a room full of congregation members and wounded 8-year-old Noya Dahan; and Noya's uncle, Almog Peretz, 34, Trinh said.
In all, Earnest fired eight to 10 rounds before his rifle appeared to either jam or malfunction, Trinh said.
Prosecutors said it's hard to know what exactly happened to the rifle until it is examined.
Two congregants pursued Earnest as he left the synagogue, including an off-duty border patrol officer who fired at Earnest's vehicle, authorities have said.
Earnest, who later called 911 to report the shooting, was arrested wearing a tactical vest capable of holding rifle magazines, Trinh said. Five loaded magazines with 50 rounds, and a tactical helmet were also found in Earnest's car, along with his rifle, he said.
San Diego County District Attorney Summer Stephan said Earnest purchased the rifle legally.
"The investigation so far indicates that he obtained the gun legally," said Stephan, who declined to say where Earnest bought the gun.
She said there was no obvious evidence that the gun was altered.
Earnest "had terror on his mind," when he arrived at the synagogue, Stephan said.
The shooting was captured on the synagogue surveillance video. Ten expended rifle cases were later recovered from the scene, prosecutors said.
"While Saturday's shooting devastated the heart of San Diego County, it has galvanized our spirit to stand against hate and to hold those who hate accountable," she told reporters after the arraignment.
The murder and attempted murder charges come with hate-crime and gun allegations that can bring harsher penalties if he is convicted.
As part of the murder charge, Earnest is accused of intentionally killing Kaye because of her religion -- a special circumstance that in California could lead to capital punishment.
California Gov. Gavin Newsom, a Democrat, issued a moratorium on executions in March. Although the order prevents them from happening for now, it does not prevent death penalty sentences from being handed out.
Earnest also is charged with arson of a house of worship, according to a criminal complaint. The arson charge relates to a fire in late March at a mosque in nearby Escondido.
Someone using suspect's name posted letter citing New Zealand attack as inspiration
Police haven't commented on a motive. But 73 minutes before the Poway attack, someone identifying themselves as John Earnest posted a link to a hate-speech-filled open letter hyperlinked on 8chan, an anonymous message board that often features hate speech and extremist posts.
The letter is filled with anti-Semitic and white nationalist sentiment. The author talks about planning the attack and in several instances cites last month's deadly mosque shootings in Christchurch, New Zealand, saying it "was a catalyst" and had "inspired" him.
The letter also mentions Robert Bowers, the defendant in last year's deadly Tree of Life Synagogue shooting in Pittsburgh, as a direct inspiration.
In court, Trinh referenced the manifesto that was "claimed to have been written by the defendant."
"In the manifesto, the defendant expressed his intent to send Jews to hell," Trinh said.
Earnest also admitted to setting the March blaze at the Escondido mosque in the manifesto, Trinh said.
Tipsters alerted the FBI about the letter mere minutes before the attack, an official says
Minutes before the shooting, tipsters alerted the FBI to the letter, an FBI official said.
The FBI official said several tips came into its tip website and phone line about five minutes before the shooting, which police said began at 11:23 a.m. PT.
The FBI did not determine the author of the 8chan post or the location of the intended attack before the shooting happened.
On its Twitter account, 8chan claims it deleted the post nine minutes after it was published. 8chan representatives have not responded to CNN's inquiry into whether they alerted law enforcement to the post.
Though the letter talks about killing Jewish people, it does not refer to Poway, San Diego or the Chabad of Poway synagogue.
The open letter is structured in a question-and-answer format in which the person identifying themselves as Earnest answers general questions about their own character, political affiliation and motivation for carrying out an attack.
In the 8chan post, the person identifying themselves as Earnest says he's "only been lurking" on the site for a year and a half, before linking to a Facebook page saying, "a livestream will begin shortly." The New Zealand attack was livestreamed on Facebook.
This time, no live video was found on the Facebook page linked on the 8chan post, according to archived web pages.
Defendant's family: How he was 'attracted to such darkness is a terrifying mystery'
Earnest's family said in a statement released Monday they are "shocked and deeply saddened by the terrible attack."
"But our sadness pales in comparison to the grief and anguish our son has caused for so many innocent people," the statement reads. "He has killed and injured the faithful who were gathered in a sacred place on a sacred day."
"To our great shame, he is now part of the history of evil that has been perpetrated on Jewish people for centuries," the statement reads.
The statement also said Earnest's actions "were informed by people we do not know, and ideas we do not hold."
"How our son was attracted to such darkness is a terrifying mystery to us," the statement reads.
CSUSM President Karen S. Haynes told CNN affiliate KGTV in a statement to the campus community that Earnest was a student at the north San Diego County campus and made the dean's list.
"We are heartbroken by this tragedy, which was motivated by hate and anti-Semitism," the statement reads. "This despicable act is entirely against our values as a University, particularly given that many in our community are preparing to observe Yom HaShoah (Holocaust Remembrance Day) on May 1. We stand in solidarity with the Jewish community and reject the rhetoric of divisiveness that feeds hatred."