Streaming live from a camera mounted on his helmet , a gunman pushed on the doors of a synagogue, fired several shots at a lock on the door, stuck an explosive in a door jam and lit it.
But he couldn't get in.
The fact that the door held likely spared the lives of the dozens of people inside the synagogue on Yom Kippur, the holiest day in the Jewish calendar.
Police say the gunman killed two people Wednesday in the eastern German town of Halle -- one directly outside the synagogue, and one at a nearby kebab shop. Police have arrested the suspected gunman.
A 35-minute video of the apparent attack posted online shows the suspected gunman, who had what appeared to be explosives in his car, trying to break down the synagogue doors, cursing in frustration and driving away.
There were 70 to 80 people inside at the time, Max Privorozki, the head of Halle's Jewish community, told the German news magazine Der Spiegel .
Privorozki told Der Spiegel that inside the synagogue, they heard shots and stopped the service. Through a camera set up at the entrance, Privorozki said he could see someone trying to get in, firing at the door and throwing explosives, the magazine reported.
"But the door stayed shut, God protected us," he told Der Spiegel. "The whole thing lasted perhaps five to ten minutes."
Ten Americans were among those inside the synagogue at the time of the attack, US Ambassador to Germany Richard Grenell wrote on Twitter, adding that all ten are safe and unharmed.
CNN is not showing the video.
A spokesperson for Twitch confirmed to CNN that the video was streamed live on their platform. The site is most commonly used to livestream video games.
"Twitch has a zero-tolerance policy against hateful conduct, and any act of violence is taken extremely seriously," the company said in a statement.
In the video, the suspect, who wore dark clothing and gloves, launches into an anti-Semitic rant, claiming the Holocaust "never happened" and saying that the Jews are the root of some of the world's problems.
After failing to enter, the gunman drove away and opened fire at a kebab shop less than a half-mile away, killing one person, police said.
The video, which was filmed from the shooter's perspective, bears striking resemblance to the video filmed by the suspect in the March attack on two mosques in Christchurch, New Zealand . The suspected gunman in that incident livestreamed a nearly 17-minute video of the attack.
On Twitter , the US Embassy in Berlin condemned the attack in Halle.
"This attack is an attack on all of us and the perpetrators must be held accountable. We mourn the victims of this senseless violence. #hal0910, the post said.