A man in a white overall is escorted by police officers as he arrives at the federal prosecutor's office in Karlsruhe, Germany. Picture: Uli Deck/dpa via AP

Karlsruhe Germany - The man accused of killing two in a gun attack near a synagogue in the eastern German city of Halle has admitted to the crime and to having a far-right, anti-Semitic motivation, prosecutors said on Friday.

Stephan B., who published an openly racist and anti-Semitic manifesto and live-streamed the shooting on Wednesday, gave a detailed account of the incident to a judge at Germany's federal court of justice, public broadcaster ARD and other media said.

Investigators earlier seized evidence from the Halle flat he shared with his mother, including the 3D printer with which he is believed to have made the home-made guns he used in his failed attempt to storm the synagogue, magazine Der Spiegel reported.

In an 11-page manifesto, packed with references to the gaming and online messageboard communities he seemingly frequented, the 27-year-old outlined plans to kill dozens of Jews praying inside.

People place down flowers in front of a synagogue in Halle, Germany, where a heavily armed assailant ranting about Jews tried to force his way in on Yom Kippur, Judaism's holiest day, then shot two people to death nearby. Picture: Jens Meyer/AP

In an interview with Der Spiegel, Stephan B.'s mother said the alleged attacker had experimented with drugs in his early 20s and barely survived the experience, from which he had emerged a different person.

His full name cannot be published under German privacy laws. 

Reuters