Germany must crack down on hate, violence and hostility, Chancellor Angela Merkel has said, a day after a gunman killed two people near a synagogue in a live-streamed rampage.
Merkel said there could have been many more victims had the suspected perpetrator, German national Stephan B, breached the gates to the synagogue in the eastern city of Halle.
The gunman failed to get into the synagogue in Wednesday's attack, but went on to kill two bystanders in his live-streamed rampage, which appeared to be modelled on last year's gun attack on a New Zealand mosque.
"I am, like millions of people in Germany, shocked and dejected by the crime that was perpetrated in Halle yesterday," Merkel said to loud applause in an address to a trade union congress in Nuremberg on Thursday.
"We all know, we only just avoided a terrible attack on the people in the synagogue," she added.
"There could have been many more victims."
In a video of more than 30 minutes that the attacker live-streamed from a helmet camera, he was heard cursing his failure to enter the synagogue before shooting dead a woman passer-by in the street and a man in a nearby kebab restaurant.
Two other people were injured but regional broadcaster MDR said their condition was not critical.
German media said investigators had searched the attacker's home.
MDR reported that he lived with his mother in Benndorf, west of Halle.
"He planned to kill people," MDR quoted one investigator as saying.
A military source said Stephan B had done military service, but received no special training.
His full name cannot be published under German privacy laws.
"We are happy about every synagogue, every Jewish community and all Jewish life in our country," Merkel said.
"That means ... the representatives of the state must use all the means of the state to crack down on hate, violence and hostility towards people."
Germany's federal prosecutors ramped up their legal case on Thursday, saying they would ask the investigating judge at the Federal Court of Justice to issue an arrest warrant against Stephan B, who was detained on Wednesday.