The suspect in the attack on a German synagogue on Wednesday wanted to carry out a “massacre” inside the building and had a large stockpile of explosives in his car, prosecutors have said.

Chief federal prosecutor Peter Frank said many questions remain about the suspect in the attack which left two dead. Mr Frank said “what we experienced yesterday was terror”, and the suspect wanted to create a “worldwide effect” by live-streaming his attack and encouraging others to imitate him.

He said also that investigators are yet to determine how the suspect got hold of the material used to build homemade weapons and explosives, and whether anyone else knew of his plans.

German authorities and technicians for an online video platform worked through the night to prevent the spread of a video of Wednesday’s attack on the synagogue in eastern Germany, which was filmed by the gunman.

With echoes of last year’s New Zealand mosque attack, the Halle incident was livestreamed on the platform Twitch for 35 minutes via a helmet camera and mobile connection.

The footage resembles a real-life video game: a shotgun visible on-screen and live commentary from the suspected gunman, a 27-year-old German named as Stephan Balliet.

“Hi, my name is Anon,” the skinhead can be heard saying at the start of the stream. He goes on to deny the Holocaust and blame Jews for the “decline of the West”.

A recording of the video was generated automatically after the stream ended and was viewed by 2,200 people within 30 minutes before it was flagged and removed by Twitch – but not before it had been shared on other platforms.

The attack in Halle played out in real time: his failed attempts to shoot, then bomb his way into the synagogue with homemade explosives.

When he failed to gain access, he shot dead a woman at close range near the adjacent graveyard. Then he shot a man dead inside a nearby kebab shop as customers who saw him approach tried to flee. Eventually his sawn-off shotgun jammed.

The suspect’s father told Germany’s Bild tabloid he had split up with his son’s mother when he was 14 and that his son had quit college after a serious stomach operation. In recent years he had become absorbed by video games and online platforms.

“He was not at peace, not with himself and not with the world,” the father told the newspaper. “He always gave others the blame.”

A woman lays flowers in front of the doner kebab restaurant that was one of the sites of a shooting in Halle on Wednesday. Photograph: Axel Schmidt/AFP via Getty Images

German justice minister Christine Lambrecht said right-wing extremism “is one of the biggest threats facing us”. She vowed to get tougher on online platforms if they carry threats or material that incites hatred.

On a visit to the synagogue on Thursday, German president Frank-Walter Steinmeier urged the nation to stand up for their Jewish compatriots.

“It is not enough to condemn such a cowardly attack.

“It must be clear that the state takes responsibility for the safety of Jewish life in Germany,” he said.

Lax security

Jewish leaders in Germany have criticised authorities in Halle and the state of Saxony-Anhalt for lax security measures at the synagogue.

Unlike in other states, where police guard Jewish buildings around the clock, there was no police guard at the Halle temple on Wednesday as 51 people marked Yom Kippur, the highest Jewish holy day.

“If there had been a police guard this man could have been taken care of at a point so it wouldn’t have come to the second attack in the kebab stand,” said Dr Josef Schuster, president of the Committee of Jews in Germany, on national radio. “I hope Saxony-Anhalt heeds this wake-up call.”

Those inside the synagogue said they heard explosions from outside during services. While older worshippers and children hid in a back room, a group of men moved towards the front door, which held against the shots and improvised bombs.

“I went into the corridor and saw smoke was coming into the building, like after an explosion,” said one man to local media. “We barricaded the door to the prayer room with chairs. We were prepared to fight, we thought he’d be in within two or three minutes. We’d already called police and wondered when help would finally come.”

In the end the community were locked in the synagogue for more than four hours, unsure if further attacks were imminent or additional attackers were outside.

German chancellor Angela Merkel attends a solidarity event at the Neue Synagoge in Berlin on Wednesday night. Photograph: Christoph Soeder/dpa via AP

The attack on a solemn Jewish holiday prompted soul-searching among German politicians and media. On Wednesday evening, chancellor Angela Merkel joined a spontaneous gathering at one of Berlin’s central synagogues.

Federal interior minister Horst Seehofer was due to visit the Halle synagogue on Thursday after what he has called a far-right, anti-Semitic attack.

String of attacks

Germany has seen a series of high-profile anti-Semitic attacks on Jews and rabbis in recent years, including on Israeli restaurant owners and even a kippa-wearing Arab Israeli. Many attacks took place in broad daylight, with both Muslim immigrant and German perpetrators.

The suspected gunman was confronted by police at the scene of the attack, hid behind his car and then opened fire on arriving forces. He fled the scene, leaving behind a car filled with ammunition and homemade bombs, and was detained 70km from Halle three hours after the attack.

As well as the two dead, two other passersby were shot and are in a serious condition in a local hospital.

The online streaming of the attack has revived the debate which began after the Christchurch attack about the responsibilities of online video platforms.

Brielle Villablanca, director of corporate communications at Twitch, said the company was “shocked and saddened” by the attack and had zero tolerance to related content.

“We worked with urgency to remove this content and will permanently suspend any accounts found to be posting or reposting content of this abhorrent act,” she added. Additional reporting: PA/Reuters