Two people have been killed after a heavily armed gunman tried to force his way into a German synagogue in a rampage on Judaism’s holiest day.

The attacker live-streamed himself as he opened fire on the place of worship, throwing Molotov cocktails, firecrackers or grenades, but was unable to gain entry, authorities and witnesses said.

He shot several times at the door of the building, where up to 80 people inside were observing Yom Kippur, as the horror unfolded in the city of Halle on Wednesday.

Some 35 minutes of footage from the attack were posted on a video game site, officials said.

In filmed remarks before the rampage, the gunman shouted that Jews were "the root" of "problems" such as feminism and "mass immigration," denying the Holocaust, before he shot a woman in the street after failing to enter the synagogue.

He then entered a nearby kebab shop and killed another person before fleeing.

The man fired shots outside the synagogue and at a nearby kebab restaurant, security officials said as it was confirmed two people had been killed.

Interior minister Horst Seehofer said authorities must assume it was an anti-Semitic attack.

One person has been arrested, police said.

Livestreaming site Twitch confirmed video showing the shooting was streamed on its site. The firm said it had "worked with urgency" to remove the footage and would permanently suspend any account found to be posting or reposting "content of this abhorrent act".

The filming of Wednesday's attack echoed another horrific shooting halfway around the world, when a far-right white supremacist in March killed 51 people at two mosques in Christchurch, New Zealand, and live-streamed much of the attack on Facebook.

That massacre drew strong criticism of social media giants for not immediately finding and blocking such a violent video.

Wednesday's assault also followed attacks in the US over the past year on synagogues in Pittsburgh and Poway, California.

News magazine Der Spiegel, which did not give its sources, said the suspect is a 27-year-old man from Saxony-Anhalt state, where Halle is located. It also said investigators have a video that the assailant apparently filmed with a camera on his helmet.

Rita Katz, the head of the SITE Intelligence Group, wrote on Twitter that 35 minutes of footage of the attacks were posted online and that the attacker said in English before the shooting that the "root of all problems are the Jews".

She said it showed the attacker shooting a woman in the street after failing to enter the synagogue, then entering a business and killing another person before fleeing.

Federal prosecutors, who in Germany handle cases involving suspected terrorism or national security, took over the investigation into the attack.

A video clip shared by regional public broadcaster MDR showed a man in a helmet and an olive-coloured top getting out of a car and firing four shots from behind the vehicle from a long-barrelled gun. It was not clear what he was shooting at.

The head of Halle's Jewish community, Max Privorozki, told Der Spiegel that a surveillance camera at the entrance of the synagogue showed a person trying to break into the building while there were 70 or 80 people inside.

"The assailant shot several times at the door and also threw several Molotov cocktails, firecrackers or grenades to force his way in," he said.

"But the door remained closed - God protected us. The whole thing lasted perhaps five to 10 minutes."

Germany: Halle Synagogue Shooting - In pictures 11 show all Germany: Halle Synagogue Shooting - In pictures 1/11 Police rush to hunt down the perpetrators of the fatal gun attack AP 2/11 AP 3/11 Reuters 4/11 AFP via Getty Images 5/11 AP 6/11 Police search the area between Wiedersdorf and Landsberg AFP via Getty Images 7/11 Policemen secure the area between Wiedersdorf and Landsberg where shots were fired in a second attack AFP via Getty Images 8/11 Reuters 9/11 At least two people were killed in the attack Sky News 10/11 Reuters 11/11 AP 1/11 Police rush to hunt down the perpetrators of the fatal gun attack AP 2/11 AP 3/11 Reuters 4/11 AFP via Getty Images 5/11 AP 6/11 Police search the area between Wiedersdorf and Landsberg AFP via Getty Images 7/11 Policemen secure the area between Wiedersdorf and Landsberg where shots were fired in a second attack AFP via Getty Images 8/11 Reuters 9/11 At least two people were killed in the attack Sky News 10/11 Reuters 11/11 AP

Synagogues are often protected by police in Germany. Security was stepped up at synagogues in other cities after the shooting in Halle.

German officials condemned the attack.

"Shots being fired at a synagogue on Yom Kippur, the festival of reconciliation, hits us in the heart," German foreign minister Heiko Maas said on Twitter.

"We must all act against anti-Semitism in our country."

Vice chancellor Olaf Scholz said that "all our country's citizens of Jewish faith can be sure that we are with them with our whole heart and we will give them all the security that is possible

Manfred Weber, the German leader of the centre-right EPP group in the parliament, declared that "anti-Semites and anybody who wants to question freedom of belief are not just our opponents, they are our enemies".