Police take one person into custody while local media report that attacker has a far-right background.

A heavily armed assailant has killed two people in eastern Germany after trying to enter a synagogue on Yom Kippur, the holiest day in the Jewish calendar.

One person was detained by police following Wednesday’s attack, which started outside the synagogue in the city of Halle.

“Our forces have detained one person,” the Halle police wrote in a tweet. “We remain alert, however. We have deployed forces in and around Halle and are trying to stabilise the situation until we have all the relevant information.”

The attacker is believed to be a 27-year-old German man with an extreme-right background, security sources told the DPA news agency. The police believe the assailant was acting alone.

Speaking to NTV, a police spokesman said the motive of the suspect or suspects was not clear.

“We don’t have any indication about the motive of this act.”

But Germany’s top security official, Interior Minister Horst Seehofer, said authorities must assume that it was an anti-Semitic attack, and said prosecutors believe there may be a right-wing extremist motive.

The suspected gunman is understood to have broadcast his attack on a streaming platform popular with video gamers. Footage shared online and seen by Al Jazeera shows a man in a vehicle making anti-Semitic and misogynistic comments before walking through the town, failing to enter a synagogue and shooting those he encounters.

Police have not yet confirmed details of the attack, but federal anti-terrorism agents are taking over the investigation, it has emerged.

Richard Grenell, the US ambassador to Germany, said 10 of the people inside the synagogue were US citizens.

German Chancellor Angela Merkel condemned the shooting, her spokesman said, adding an expression of “solidarity for all Jews on the holy day of Yom Kippur”.

Merkel had “deep sympathy” for the victims’ loved ones, government spokesman Steffen Seibert tweeted, adding the chancellor’s “thanks to all the security forces who are still on the scene”.

The head of Halle’s Jewish community, Max Privorotzki, told news magazine Der Spiegel there were 70 or 80 people inside the synagogue and security outside when the shooting occurred. No securitypresence is seen in the video shared online.

Synagogues are often protected by police in Germany, and police in two other eastern cities, Dresden and Leipzig, stepped up security at synagogues there after the shooting in Halle.

“That on the Day of Atonement a synagogue was shot at hits us in the heart,” Foreign Minister Heiko Maas wrote on Twitter. “We must all act against anti-Semitism in our country.”

Another shooting was heard in the town of Landsberg, 15km (nine miles) away, but it has not been confirmed if the two were linked.

The central train station in Halle had been closed while the area was under lockdown, rail company Deutsche Bahn said, but local police lifted the curfew around six hours after the shooting.

Eyewitness Konrad Roesler told news channel NTV he was in a Turkish restaurant about 600 metres from the synagogue when “a man wearing a helmet and military uniform” flung a hand grenade at the store.

“The grenade hit the door and exploded,” he said.

“[The attacker] shot at least once in the shop, the man behind me must be dead. I hid in the toilet and locked the door.”

Wednesday’s shootings came three months after the shocking assassination-style murder of local pro-migrant politician Walter Luebcke in the western city of Kassel, allegedly by a known neo-Nazi.

Luebcke’s killing has deeply shaken Germany, raising questions about whether it has failed to take seriously a rising threat from right-wing extremists.

Investigators have been probing the extent of suspect Stephan Ernst’s neo-Nazi ties and whether he had links to the far-right militant cell National Socialist Underground (NSU).

Interior Minister Horst Seehofer last month warned of the rising danger of the militant far right, calling it “as big a threat as radical Islamism”.

Seehofer said that police had uncovered 1,091 weapons including firearms and explosives during probes of crimes linked to the far right last year, far more than in 2017 when 676 were found.

At the same time, Germany has also been on high alert following several attacks in recent years claimed by the Islamic State in Iraq and the Levant group.