09 October 2019, Saxony-Anhalt, Landsberg: Police officers walk along a hedge with machine guns in their hands near Wiedersdorf/Landsberg. Besides the shots in Halle, there were also shots in Landsberg (Saalekreis) about 15 kilometres away. (Photo by Jan Woitas/picture alliance via Getty Images)

Wednesday's shooting in the eastern German city of Halle outside of a synagogue was livestreamed on Amazon's Twitch service, the company confirmed to CNBC. The video was 35 minutes long. Two people were killed in the attack, German police said earlier in the day.

"We are shocked and saddened by the tragedy that took place in Germany today, and our deepest condolences go out to all those affected," a Twitch spokesperson said. "Twitch has a zero-tolerance policy against hateful conduct, and any act of violence is taken extremely seriously. We are working with urgency to remove this content and permanently suspend any accounts found to be posting or reposting content of this abhorrent act."

Twitch posted a series of tweets on the matter later Wednesday, claiming that "approximately five people" watched the stream while it was live. Twitch said a recording of the stream was then viewed by about 2,200 people "in the 30 minutes before the video was flagged and removed from Twitch."

The company also said the account was created two months prior to streaming the shooting.

"This video was not surfaced in any recommendations or directories; instead, our investigation suggests that people were coordinating and sharing the video via other online messaging services," the company said. "Once the video was removed, we shared the hash with an industry consortium to help prevent the proliferation of this content. We take this extremely seriously and are committed to working with industry peers, law enforcement, and any relevant parties to protect our community."

Tweet.

NBC News reported that the video showed the shooter parking near the synagogue and shooting a woman before he entered the building. He wasn't able to enter the synagogue and shot another person after driving to a kebab shop. The video was also posted to 10 white-supremacist Telegram channels where they were accessibly by tens of thousands of users, NBC News said.

It shows the growing problem that streaming platforms are facing: When people want to commit evil, they can broadcast their crimes to an audience using social networks, which can amplify their reach.

Twitch is a platform that was built to allow video gamers to livestream their games while chatting with their audience. Other companies have dealt with similar problems.

The footage is no longer on Twitch. CNBC was able to find links to download the video on other sites including 4Chan, however.

The New Zealand mosque massacre, which claimed 50 lives, was livestreamed to Facebook in March. Facebook said it worked to remove 1.5 million videos of the attack that were posted in 24 hours after it was initially streamed, and that 1.2 million of them were "blocked at upload," by Facebook. YouTube, Twitter and Reddit also removed versions of the New Zealand livestream from their sites.

— CNBC's Lauren Feiner contributed to this report. NBC News contributed to this report.

Follow @CNBCtech on Twitter for the latest tech product news.