The man who attacked a synagogue in the German city of Halle earlier this week has confessed to the crime and admitted having a right-wing extremist and anti-Semitic motive, dpa has learned.
The 27-year-old, who has been named by the authorities only as Stephan B under strict German privacy laws, made the confession during a hearing lasting multiple hours with an investigative judge at Germany's Federal Court of Justice on Thursday evening.
The lone gunman tried and failed to storm the Jewish place of worship in the eastern German city on Wednesday. The attack coincided with Yom Kippur, the Jewish Day of Atonement regarded as the holiest day of the year. Fifty-one people were in the synagogue at the time.
He then killed a woman in front of the synagogue and a man in a kebab shop. He also injured a 40-year-old woman and her 41-year-old husband with shots while fleeing. The incident is being treated as a far-right terrorist attack.
Stephan B is under arrest after a warrant was issued charging him with two murders and seven attempted murders, a federal prosecution spokesman said.

Police enter a Jewish cemetery over a wall near the scene of the shooting. Source: Getty Images
Stephan B filmed his deeds with a helmet camera and broadcast them on the internet. He also wrote an 11-page "manifesto". German authorities have said that he wanted to imitate similar acts and then be imitated himself.
Reacting to the attack in comments published on Friday, German Defence Minister Annegret Kramp-Karrenbauer called for stronger security laws.
"Our country and its basic order is being attacked from within," Kramp-Karrenbauer, who also heads German Chancellor Angela Merkel's Christian Democratic Union party, told the Tagesspiegel newspaper.

Special forces policemen guard the scene. Source: Getty Images
Kramp-Karrenbauer said clarification was needed as to why the synagogue did not have security given the Jewish holiday, and added that authorities must work to break apart right-wing extremist, anti-Semitic and Islamist networks.