POWAY, Calif. -- Authorities have identified the 19-year-old man who is suspected of opening fire at a synagogue in the southern California town of Poway on Saturday as John Earnest.
He had no prior arrests in San Diego, San Diego County Sheriff Bill Gore said at a news conference.
Earnest was in custody after a shooting at a synagogue in the California city of Poway left at least one person dead and several others wounded, Mayor Steve Vaus said Saturday.
The shooting, which Vaus described as a possible hate crime, occurred at Congregation Chabad on the last day of Passover.
President Donald Trump, speaking outside the White House Saturday, told reporters, "At this moment it looks like a hate crime, but, my deepest sympathies to all of those affected and we'll get to the bottom of it."
The Palomar Medical Center Poway received four patients from the shooting, according to a hospital spokeswoman.
One of the patients, an older female, died there, San Diego County Sheriff Bill Gore said. The three others -- a girl and two men -- were in stable condition with non-life-threatening injuries, he said.
Vaus said he considered it a hate crime "because of statements that were made when the shooter entered."
The mayor said the congregation was targeted by "someone with hate in their heart ... towards our Jewish community and that just will not stand." The congregation "took security very seriously," he said.
"I also understand from folks on the scene that this shooter was engaged by people in the congregation and those brave people certainly prevented this from being a much worse tragedy," Vaus told CNN.
Gore told reporters that the gunman was armed with an "AR-type assault weapon."
The suspect fled the scene and called 911 to say he was involved and give his location, San Diego Police Chief David Nisleit said. A San Diego K-9 officer arrived and the shooter surrendered without incident, he said.
Gore said the suspect was being interviewed by detectives and the FBI. He said investigators were looking over his social media posts and an "open letter" he wrote "to determine the legitimacy of it and exactly how it plays into the investigation."
The sheriff refused comment on a motive.
"I want you to know this is not Poway," Vaus told reporters.
Congregation member Minoo Anvari, who said her husband witnessed the shooting, said the rabbi called for unity and prayed for peace even after getting shot.
"Rabbi said, 'We are united,'" said Anvari, a refugee from Iran.
"This is something bad (that) is happening all over. And we have to believe that this bad thing is real and we don't have to ignore it. We have to open our eyes. He prayed for peace. I respect him -- even in spite of being injured he refused to go to hospital and he spoke. And he finished his speech and he then left the synagogue."
Anvari said her husband told her the shooter was screaming and cursing when he opened fire.
A witness told KGTV there were six or seven shots followed by screams and then another volley of shots. The witness said the wounded rabbi tried to calm the gunman and members of the congregation.
The San Diego Police Department is assisting sheriff's deputies with the shooting, according to a tweet from Nisleit.
"No known threats however in an abundance of caution, we will be providing extra patrol at places of worship," Nisleit said.
The sheriff said the shooting happened at 11:23 a.m. (2:23 p.m. ET). The synagogue's Facebook page said a Passover celebration was scheduled for 11 a.m.
Passover, one of the holiest Jewish celebrations of the year, ends Saturday.
The shooting comes months six months to the day after the shooting at the Tree of Life synagogue in Pittsburgh.
On October 27, Robert Bowers stormed the synagogue, killing 11 people in what the Anti-Defamation League said was the deadliest anti-Semitic attack in US history. A federal law enforcement official said at the time that Bowers made anti-Semitic statements during the shooting and targeted Jews on social media.
The Chabad of Poway website said the congregation is a center for Jewish people of all backgrounds. It was established in 1986.
Poway, about 20 miles north of San Diego, has about 48,000 residents. It is an upper-middle-class community that calls itself "The City in the Country." The city website said it has one of the lowest crime rates in the state.