At least two people were shot dead in the German city of Halle on Wednesday in an anti-Semitic attack as Jews marked the holy day of Yom Kippur, with the gunman filming the assault and posting a video online.
The suspect has been captured, police said, as security was ramped up at synagogues and other Jewish sites across Germany.
In a copy of a 35-minute video obtained by AFP but whose authenticity has not been confirmed by police, the gunman filmed himself launching into a diatribe against women and Jews, before carrying out the attack, in a disturbing repeat of the modus operandi of the attacker in the Christchurch mosque assault earlier this year.
German Chancellor Angela Merkel condemned the deadly shooting, her spokesman said, adding an expression of "solidarity for all Jews on the holy day of Yom Kippur".
The chancellor later attended a vigil at Berlin's main synagogue.
Israeli Prime Minister Benjamin Netanyahu called the attack "a new expression of anti-Semitism on the rise in Europe."
"I urge German authorities to continue to act resolutely against the phenomenon of anti-Semitism," Netanyahu tweeted.
The head of the Central Council of Jews in Germany ripped into the authorities for failing to provide adequate security on such a key day.
"It is scandalous that the synagogue in Halle is not protected by police on a holiday like Yom Kippur," said Josef Schuster.
"This negligence has now been bitterly repaid."
World Jewish Congress chief Ronald Lauder said Germany needs to deliver with "action rather than words" and provide Jewish institutions the protection they need.
- 'Heavily armed' -
Police had said in the early afternoon that two people were shot dead, urging residents to stay indoors.
A suspect was subsequently arrested, and almost six hours later, police lifted the lockdown, assessing that there was no longer acute danger.
Citing federal prosecutors, Interior Minister Horst Seehofer said "there are sufficient indications for a possible right-wing extremist motive."
Jewish community leader Max Privorotzki, who was in the Halle synagogue, told Stuttgarter Zeitung of the harrowing minutes as the site came under assault.
"We saw through the camera of our synagogue that a heavily armed perpetrator wearing a steel helmet and rifle was trying to shoot open our door."
Between 70 and 80 people were in the synagogue then, Privorotzki said.
"We barricaded our doors from inside and waited for the police," he said, adding that "in between, we carried on with our service."
Among those in the synagogue were 10 Americans, said US ambassador Richard Grenell.
In addition to the two dead -- a man and a woman -- two people also suffered serious bullet wounds in the attack but their lives are no longer in danger, a spokesman for the city's hospital said.
Germany has been on high alert following several attacks in recent years, including some claimed by the Islamic State group, as well as neo-Nazi plots.
- 'Like a professional' -
Anti-terrorist prosecutors confirmed that they were taking over the probe given "the particular importance of the case" which involved "violent acts that affect the domestic security of the Federal Republic of Germany".
In the attack video, the gunman speaking in heavily German-accented English launched into a diatribe against Jews, claiming that the Holocaust never happened.
He was then seen trying to force open the synagogue door before shooting a woman dead. He then tried to blast the gate of the Jewish cemetery open with explosives, but failed to break it open.
The man was later seen shooting at a patron of a kebab shop about 600 metres (yards) away from the synagogue.
Witness Conrad Roessler told news channel NTV he was in the Turkish restaurant when "a man wearing a helmet and military uniform" tossed a hand grenade.
"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."
The owner of the shop, Rifat Tekin, described the gunman coldly carrying out his rampage.
"He was quiet, quiet like a professional. Maybe he has done this many times. Like me making a kebab, he's doing this -- like a professional."
- 'Big threat' -
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).
The former communist states in east Germany have also gained notoriety for their right-wing extremists.
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.