POWAY, Calif. (Reuters) - A gunman walked into a San Diego-area synagogue crowded with Sabbath worshippers on Saturday and opened fire with an assault-style rifle, killing one woman inside and wounding three others in a hate crime carried out on the last day of Passover, authorities said.

The suspect, who fled the scene by car but surrendered to police a short time later, was identified by authorities as John Earnest, 19, of San Diego, the apparent author of a “manifesto” who claimed to have set a nearby mosque on fire last month and professed drawing inspiration from the gunman who killed nearly 50 people at two mosques in New Zealand.

San Diego County Sheriff Bill Gore said police and FBI were investigating Earnest’s “possible involvement” in an unsolved predawn arson on March 24 at the Islamic Center of Escondido, a town about 15 miles (24 km) north of the synagogue attacked on Saturday. No one was hurt at the mosque fire.

Gore said Earnest, whose weapon apparently malfunctioned after the first several rounds he fired, had no prior criminal record.

The gun violence at the Congregation Chabad synagogue in the town of Poway, California, about 23 miles (37 km) north of downtown San Diego, unfolded six months to the day after 11 worshippers were killed and six others wounded by a gunman who stormed the Tree of Life synagogue in Pittsburgh yelling, “All Jews must die.”

The assailant in that massacre, said to be the deadliest attack ever against Jews on U.S. soil, was arrested.

Saturday’s Passover violence followed a recent spate of deadly attacks on houses of worship around the world. Suicide bombings during Easter Sunday services at several churches in Sri Lanka killed more than 250 people. A gunman who opened fire at two mosques in Christchurch, New Zealand, on March 15 left 49 people dead and more than 40 wounded, some as they knelt in prayer.

Slideshow ( 12 images )

Poway Mayor Steve Vaus characterized Saturday’s shooting as a “hate crime,” saying his assessment was based on statements uttered by the gunman when he entered the synagogue.

At a news conference later, Gore told reporters: “Clearly it’s being investigated as a homicide, but we’re also looking at the hate crime possible violation as well as federal civil rights violations.”

A rambling, violently anti-Semitic, anti-Muslim screed written by an individual calling himself John Earnest was found posted to the online text-storage site Pastebin.com and the file-storage site Mediafire.com. Links to the content on both sources were posted on the Internet message board 8chan.

In that letter, the author also claimed credit for the Escondido mosque arson, which was put out by congregants inside who were alerted by the smell of smoke. Local media at the time reported that a message scrawled on the driveway of the mosque mentioned the New Zealand massacre.

Speaking with reporters at the White House about Saturday’s attack, U.S. President Donald Trump said, “My deepest sympathies go to the people that were affected.” He added that “it looks like a hate crime” and that authorities will “get to the bottom of it.”

Slideshow ( 12 images )

RABBI AMONG THE WOUNDED

Gore told reporters that four people were struck by gunfire and taken to Palomar Medical Center, where one of the victims, an “older woman,” died. The three other patients - “two adult males” and a “female juvenile” - were listed in stable condition, Gore said.

Authorities later identified one of the victims as the rabbi, who underwent surgery for treatment of “defensive wounds to his index fingers.” The sheriff’s office said the two other patients, a 34-year-old man and the girl, were each struck by shrapnel but were “doing well.”

The attack occurred shortly before 11:30 a.m. in Poway, a suburb of about 50,000 residents, when the suspect walked into the synagogue and started shooting, Gore said. As he was making his getaway, an off-duty U.S. Border Patrol agent opened fire on the suspect, striking the vehicle but apparently missing the suspect, according to Gore.

The gunman was arrested a short time later when he gave himself up to police.

A San Diego officer was en route to the shooting scene when he overheard a California Highway Patrol (CHP) radio dispatch “of a suspect who had called into CHP to report that he was just involved in this shooting and his location,” San Diego Police Chief David Nisleit recounted.

“The officer was actually on the freeway and he clearly saw the suspect in his vehicle. The suspect pulled over and jumped out of his car with his hands up and was immediately taken into custody,” Nisleit said.

He said the assault-style rifle believed to be the murder weapon was found on the front passenger seat of the car.

The synagogue was hosting a holiday celebration beginning at 11 a.m. and due to culminate in a final Passover meal at 7 p.m. Authorities said about 100 people were inside the temple, where Saturday services marking the Jewish Sabbath would have been under way or have just concluded.

A man who lives nearby, Christopher Folts, said on CNN he heard six to seven gunshots, then a man yelling, followed by six to seven more shots.

Cantor Caitlin Bromberg of Ner Tamid Synagogue, down the street from the shooting scene, said her congregation learned of the shooting at the end of their Passover services and that they headed to Chabad of Poway to show support and help.

“We are horrified and upset, and we want them to know we are thinking of them,” Bromberg told The Los Angeles Times, adding that she has not heard from Chabad of Poway leadership because they would not normally use the phone during the Sabbath.

“They would only do that on emergency basis, if they do it at all,” Bromberg told the newspaper.