(JTA) — A shooting at a Chabad synagogue in Poway, a city in San Diego County, Calif., left one person dead and multiple people injured, including a child.

Police there detained a white 19-year old San Diego man in connection with the shooting, and hospitals said they were taking in wounded people. The man left an “open letter” prior to the shooting, law enforcement said.

“A man has been detained for questioning in connection with a shooting incident at the Chabad of Poway synagogue,” the San Diego County Sheriff’s office said Saturday afternoon on Twitter. “@SDSOPoway Deputies were called to Chabad Way just before 11:30 a.m. There are injuries. This is a developing situation.”

Sheriff William Dore said in a press conference that the fatality was an adult woman. The three injured were two adults and one juvenile, he said.

News 10 San Diego named one of the injured as the synagogue’s rabbi, Yisroel Goldstein.

In March, Goldstein wrote a Facebook post lamenting the deadly shooting at a mosque in New Zealand. “Attacking innocent people is abhorrent,” wrote Goldstein. “It is abhorrent when it is a shul in Pittsburg and it is abhorrent when it is in a Mosque in New Zealand!”

A police spokesman said that a Customs and Border Patrol agent fired on the suspect as he fled from the synagogue, hitting his vehicle. The suspect, who is 19, called police and turned himself in, exiting his car with his hands up when police arrived where he had pulled over. There was an assault rifle in the car.

NBC 7, a local news station, identified the shooter as John T. Earnest. The sheriff confirmed that Saturday evening, saying the suspect had no prior contact with the police.

Sheriff Gore said law enforcement was examining evidence that Earnest might have been involved in a mosque arson in Escondido, Calif., earlier this year, and whether the attack on the synagogue was a hate crime.

CNN quoted the Palomar Medical Center Poway as saying it was expecting four trauma patients from the shooting.

Steve Vaus, the town’s mayor, told CNN that there was one fatality, and that the danger was over. He said that congregants had engaged and helped to stop the shooter. He said the shooter apparently had anti-Semitic intent.

“I have heard that this was someone with hate in their heart, hate toward the Jewish community,” he said.

Later, Vaus added: “It was a hate crime,” an assessment he said was based on “statements that were made when the shooter entered.” He would not elaborate.

President Donald Trump, speaking in Washington, told reporters “it looks like a hate crime.”

“My deepest sympathies go to the people that were affected, the families, their loved ones, By the — obviously it looks like right now based on my last conversations looks like a hate crime, hard to believe,” he said, before leaving for Wisconsin, where he was to headline an election rally. “We’ll see what happens, it looks like a hate crime.”

The shooting comes on the last day of Passover and six months to the day after the deadliest anti-Semitic attack in U.S. history, when an alleged white supremacist murdered 11 worshippers at a Pittsburgh synagogue complex.

CNN quoted witnesses as saying that there were six or seven shots, and that the rabbi had two fingers blown off.

The Anti-Defamation League said it is on the ground in San Diego, “working with local authorities to set up a community support center for those directly affected by the shooting.”

At a rally Saturday night in Green Bay, Wisconsin, President Donald Trump said, “Our entire nation mourns the loss of life, prays for the wounded and stands in solidarity with the Jewish community. We forcefully condemn the evil of anti-Semitism, which must be defeated.”