Media playback is unsupported on your device Media caption The shooting happened at a synagogue in Poway, north of San Diego

A gunman opened fire at a synagogue in California on Saturday, killing one woman and wounding three other people, police said.

A 19-year-old man named as John Earnest was arrested after the attack, in Poway, north of the city of San Diego.

The synagogue had been hosting a Passover celebration when the gunman burst in, reports said.

Police did not suggest a motive but US President Donald Trump said the attack appeared to be "a hate crime".

The attack comes exactly six months after a shooting in Pittsburgh in which 11 people were killed, thought to be the worst anti-Semitic attack in recent US history.

San Diego County Sheriff Bill Gore told reporters that investigators were reviewing the suspect's social media activity and examining a virulently anti-Semitic "open letter" published online.

In the letter, which appeared on the online forum 8chan hours before the attack, the author - who identified himself as John Earnest - said he was inspired by the attack on two Christchurch mosques last month, as well as the Pittsburgh shooting.

Authorities later said Mr Earnest was under investigation in connection with a fire at a mosque last month.

Image copyright Reuters Image caption Police quickly sealed off the scene of the shooting in Poway

Image copyright Reuters Image caption A makeshift memorial appeared on a corner near the synagogue

"During the shooting, four individuals were wounded and transported to Palomar hospital," Sheriff Gore said. "One succumbed to their wounds. The other three are in stable condition."

Mayor Steve Vaus said the rabbi had been shot in the hand. "For this to happen only a week later at the end of the Passover, only a week after Easter is horrific," Mr Vaus told MSNBC.

How did the attack unfold?

Sheriff Gore said officers were called to the Chabad synagogue just before 11:30 (18:30 GMT) after the man opened fire with an "AR-15 type" assault rifle.

He said an off-duty border patrol officer fired at the suspect as he fled the scene in a vehicle, but did not hit him.

The suspect was later arrested by another officer, said San Diego chief of police David Nisleit.

"He clearly saw the suspect's vehicle, the suspect jumped out with his hands up and was immediately taken into custody," Mr Nisleit said.

"As the officer was placing this 19-year-old male into custody, he clearly saw a rifle on the front passenger seat of the suspect vehicle."

On Saturday evening a vigil for the victims was held at the Rancho Bernardo Community Presbyterian Church in San Diego.

Anti-Semitic attacks on the rise

The racist, anti-Semitic document that police are investigating in relation to the shooting makes 10 references to Robert Bowers, who the author John Earnest calls an "inspiration".

Mr Bowers is the man charged with killing 11 people at the Tree of Life synagogue in Pittsburgh last October - the deadliest attack on the US Jewish community in the nation's history.

In the aftermath of the Pittsburgh attack, members of the Jewish community began openly questioning whether the era of seeing the US as a safe haven was over.

"I had been dreading and expecting this day, and more like it, for two years," wrote the Washington Post columnist Dana Millbank, in a column titled "Trump's America is not a safe place for Jews".

Image copyright Reuters Image caption A woman stands at a memorial at the Tree of Life synagogue in Pittsburgh last October

In the wake of Saturday's attack in Poway, the Times of Israel published a blog post headlined, "Synagogue shootings - now a thing". The Anti-Defamation League (ADL), which monitors extremism in the US, says anti-Semitism is on the rise.

Mr Trump has publicly condemned anti-Semitism, and White House spokeswoman Sarah Sanders said it was "outrageous" to suggest he bore any responsibility for it, but many have accused him of using coded anti-Semitic language.

The ADL publicly called on him to stop using tropes such as "global special interests" and "those who control the levers of power" - both of which he ran in an ad alongside pictures of prominent Jews - as well as his claim that there were "very fine people on both sides" in Charlottesville, after white nationalists chanted "Jews will not replace us".

"All of the Jewish community across the country is concerned," Joel Rubin, a Democratic Strategist and member of the Tree of Life synagogue, told Fox News on Saturday. "My daughters go to Hebrew school and we see police cars often in front of the school, guarding it. That's not the situation in America we want to be living in."

Image copyright Reuters Image caption A candlelight vigil was held at Rancho Bernardo Community Presbyterian Church

What has the reaction been?

President Trump tweeted to offer "thoughts and prayers".

Speaking later at a rally in Wisconsin, President Trump denounced the shooting as a "hate crime" and said "America's heart" was with the victims.

"We forcefully condemn the evil of anti-Semitism and hate which must be defeated," he said.

Vice-President Mike Pence condemned the "evil and cowardly" shooting.

Minoo Anvari, whose husband was inside the synagogue, told the local CNN affiliate that the congregation was "standing together" in the wake of the attack. "We are strong. You can't break us," she said.

Meanwhile, Los Angeles officials said police patrols would be stepped up around synagogues and other places of worship following Saturday's attack.