A German court on Monday handed down a life sentence to a neo-Nazi behind a deadly attack last year that nearly became the country's worst anti-Semitic atrocity since World War II, in a verdict welcomed by Jewish groups.

A bolted door at the synagogue in the eastern city of Halle with 52 worshippers inside marking Yom Kippur, the holiest day of the Jewish year, was the only thing that prevented the heavily armed attacker from carrying out a planned bloodbath.

Stephan Balliet (L) is charged with killing two people after trying to storm a synagogue in Halle, eastern Germany
Stephan Balliet (L) is charged with killing two people after trying to storm a synagogue in Halle, eastern Germany AFP / Ronny Hartmann

After failing to storm the temple on October 9, 2019, Stephan Balliet, 28, shot dead a female passer-by and a man at a kebab shop.

"Without that famous reinforced door, he would have committed a massacre," presiding judge Ursula Mertens said as she read out the verdict.

Condemning an "odious, cowardly and inhuman act", Mertens said it had been clear that the accused had "anti-Semitic, racist and misogynist motives".

During his five-month trial, far-right defendant Stephan Balliet, 28, has denied the Holocaust in open court and expressed no remorse to those targeted
During his five-month trial, far-right defendant Stephan Balliet, 28, has denied the Holocaust in open court and expressed no remorse to those targeted AFP / Ronny Hartmann

"You are dangerous for humanity," she told Balliet as he listened impassively, dressed in black and with his head shaven.

During his five-month trial, Balliet denied the Holocaust in open court -- a crime in Germany -- and expressed no remorse over those targeted, many of whom were co-plaintiffs in the case.

He was convicted of two counts of murder and multiple counts of attempted murder in a case that deeply rattled the country and fuelled fears about rising right-wing extremism and anti-Jewish violence, 75 years after the end of the Nazi era.

Stephan Balliet (R) has been charged with two counts of murder and multiple counts of attempted murder in a case that has deeply rattled the country
Stephan Balliet (R) has been charged with two counts of murder and multiple counts of attempted murder in a case that has deeply rattled the country AFP / Ronny Hartmann
A string of far-right terrorist attacks have shocked Germany including the assassination of pro-refugee politician Walter Luebcke at his home in June 2019
A string of far-right terrorist attacks have shocked Germany including the assassination of pro-refugee politician Walter Luebcke at his home in June 2019 POOL / Swen Pförtner

Dressed in military garb, he filmed the attack and broadcast it on the internet, prefacing it with a manifesto espousing women-hating, neo-fascist ideology.

The attack bore hallmarks of two carried out and similarly live-streamed some months earlier in Christchurch, New Zealand by Brenton Tarrant, who killed 51 people. Balliet cited Tarrant as an inspiration.

During the trial, Balliet insisted that "attacking the synagogue was not a mistake, they are my enemies".

Man opens fire on street in Halle, Germany
Man opens fire on street in Halle, Germany ATV-Studio Halle / Andreas Splett

The head of Germany's Central Council of Jews, Josef Schuster, welcomed the life sentence.

"This is an important day for Germany," he said in a statement. "The verdict makes clear that there will be no tolerance for homicidal hatred of Jews."

A lawyer for nine of the co-plaintiffs, Mark Lupschitz, told AFP he was "relieved" by the verdict and called the proceedings both "stressful and empowering" for the intended victims.

A government spokesman, Ulrike Demmer, told reporters that the Halle attack "showed us how important it is to even more decisively continue the fight against anti-Semitism, xenophobia and hostility to democracy".

Israel's ambassador to Germany, Jeremy Issacharoff, said the assault remained "a very, very alarming moment in German history".

"If that guy would have been able to get into a synagogue... it would have had a tremendous impact on German identity after the war and the fight against anti-Semitism," he told AFP in an interview.

A few dozen demonstrators against right-wing extremism gathered outside the courthouse before the verdict was pronounced, unfurling a large black banner that read "We remember the victims of the attack of October 9, 2019".

Balliet "described the fatal shots fired at his two victims in Halle without emotion" and appeared disappointed that he had failed in his attempt to enter the synagogue, psychiatrist Norbert Leygraf said in an evaluation of the defendant.

He said Balliet showed symptoms of schizophrenia, paranoia and autism that prevented him from having "empathy with others" while feeling "superior to others".

After the trial, prosecutor Kai Lohse called the assault "one of the most repugnant acts of anti-Semitism since World War II" and said he hoped the court's verdict would "serve as an example".

Crimes targeting Jews and their faith have risen steadily in Germany in recent years, with 2,032 offences recorded in 2019, up 13 percent on the previous year.

Meanwhile a string of far-right terrorist attacks have shocked Germany including the assassination of pro-refugee politician Walter Luebcke at his home in June 2019 and the murder in the western city of Hanau of nine people of migrant origin in February.