HALLE, Germany -- German investigators puzzled Thursday over how the suspect in a botched attack on a synagogue on Judaism's holiest day managed to amass at least 4 kilograms of explosives and acquire four firearms, an arsenal they said he planned to use in a massacre.

While many questions remain about the suspect, German officials sought to reassure a shaken Jewish community after Wednesday's attack in the eastern city of Halle. They invoked Germany's historical responsibility from the Holocaust as they vowed better security and urged the nation to stand behind its Jews.

The attacker, a German identified by prosecutors as Stephan B., tried but failed to force his way into the synagogue as up to 80 people were inside. He then shot and killed a 40-year-old German woman in the street outside and a 20-year-old man at a nearby kebab shop.

He fled the city, wounding another two people in a small town near Halle where he abandoned his car and driving onward in a stolen taxi. He was arrested about 1 1/2 hours after the attack as he got out of the taxi, which had been in an accident.

"What we experienced yesterday was terror," said Peter Frank, Germany's chief federal prosecutor. "The suspect, Stephan B., aimed to carry out a massacre in the synagogue in Halle."

Frank said the weapons were "apparently homemade" and the explosives were in "numerous devices" found in the car.

The suspect livestreamed the attack on a popular gaming site while ranting in English about Jews and denying the Holocaust, and posted a "manifesto" online before embarking on it.

He "wanted to create a worldwide effect" by emulating attackers such as the man who killed 51 people in mosques in Christchurch, New Zealand in March and by encouraging others to imitate his own actions in Halle, the prosecutor added.

Previously unknown to German authorities, he is being held on suspicion of two counts of murder, nine of attempted murder and other offences, Frank said.

Frank said investigators "face a lot of questions," among them how the suspect became radicalized, how he acquired weapons and explosives or obtained materials to build them, and whether anyone else encouraged him or knew about his plan.

Prosecutors plan to sift through his communications and online activities.

The head of Halle's Jewish community, Max Privorozki, was among those observing Yom Kippur inside the synagogue during the attack.

The worshippers watched on monitors linked to a surveillance camera as the man tried to break into the building and fired at the door, he said.

"We saw everything, also how he shot and how he killed someone," Privorozki said, standing outside the damaged door. "I thought this door wouldn't hold."

He said it took a little while for everyone to understand what was going on.

"That was a shock for us. It was Yom Kippur, all phones were switched off. We had to understand what was going on first -then switch on my phone and then call the police," he said. "It was really panic. But I have to say after that, when the police came, we continued with the worship service. That lasted another three hours."

The previous synagogue in Halle was set on fire in the Nazis' 1938 Kristallnacht, or "Night of Broken Glass" anti-Jewish pogrom. German Interior Minister Horst Seehofer called Wednesday's attack "a disgrace for our whole country" after he visited the current house of worship on Thursday.

"With our history, something like this should not happen in Germany," Seehofer said. "Unfortunately, we must look the truth in the face, and the truth has been for a long time that the threat from anti-Semitism, right-wing extremism and right-wing terrorism in Germany is very high."

Unlike synagogues in many other German cities, the one in Halle didn't have police officers outside for Yom Kippur, an omission strongly criticized by Jewish leaders.

It and other synagogues in the region will now get full police protection. Seehofer promised wider security improvements for Jewish facilities and said the German government also was examining how to better combat hate speech online.

Germany's domestic intelligence agency says the number of anti-Semitic acts of violence rose to 48 last year from 21 in 2017. It also said the number of far-right extremists rose by 100 to 24,100 people last year, with more than half of them considered potentially violent.

In June, Walter Luebcke, a regional politician from Chancellor Angela Merkel's party, was fatally shot at his home. Luebcke was known for supporting the welcoming refugee policy that Merkel adopted during an influx of migrants in 2015. The suspect in Luebcke's killing is a far-right extremist with a string of convictions for violent anti-migrant crimes.

Seehofer and other politicians suggested that some members of the nationalist, anti-migrant Alternative for Germany party were helping stir up anti-Semitism. The party rejected the accusation and accused its opponents of trying to exploit the attack.

Some figures in Alternative for Germany, which entered the national parliament in 2017 and is strong in Germany's formerly communist east, have made comments appearing to downplay the country's Nazi past.

Merkel and other officials pointedly noted the impact of hateful words.

"We must take care with our language, because very often deeds can come from words, and that must be prevented," she said at a labour union conference in Nuremberg.

Germany's population of some 83 million includes about 200,000 Jews. Before the Nazis came to power, Germany had a Jewish population of about 500,000. Many of the Jews living in the country now are immigrants from the former Soviet Union who were taken in after the Berlin Wall fell in 1989.

"We are happy about every synagogue, every Jewish community and all Jewish life in our country," Merkel said. "This means first and foremost ... that the representatives of the state must use all the means of the state of law to act against hatred, violence and inhumanity. And there is no tolerance for that."

------

Moulson reported from Berlin. Tia Goldenberg in Jerusalem and David McHugh in Frankfurt, Germany, contributed to this report.