The horrific mass shooting at two New Zealand mosques that left 49 people dead was live-streamed on Facebook and shared across social media, sparking a scramble by tech giants to remove the sick footage.

The gunman reportedly broadcast 17 minutes of the attack.

“Police alerted us to a video on Facebook shortly after the live stream commenced and we quickly removed both the shooter’s Facebook and Instagram accounts and the video. We're also removing any praise or support for the crime and the shooter or shooters as soon as we’re aware,” Facebook said in a statement.

49 KILLED AND DOZENS, INCLUDING YOUNG CHILDREN, INJURED IN NEW ZEALAND MASS SHOOTINGS TARGETING MOSQUES

"Our hearts go out to the victims, their families and the community affected by the horrendous shootings in New Zealand," the company added.

JACKSONVILLE MASS SHOOTING: CHILLING TWITCH LIVESTREAM RECORDS HORRIFIC ATTACK

The Associated Press reports that the footage was widely available on social media hours after the horrific attack. Following the shooting, Twitter has suspended the account in question, according to a source familiar with the matter. The company is also working to remove footage from its service, noting that both are in violation of the company's policies.

YouTube, which is owned by Google, is also working to remove footage from its platform.

“Our hearts are broken over today’s terrible tragedy in New Zealand. Please know we are working vigilantly to remove any violent footage,” said YouTube, in a statement.

SOCIAL MEDIA GIANTS CLAMP DOWN ON SICKENING VIRGINIA SHOOTING FOOTAGE

The footage highlights the challenges facing social media firms in swiftly clamping down on vile that can be quickly shared across their platforms.

This is not the first time that a shooting has been live streamed. Last year, chilling live stream footage that showed the deadly shooting at a Madden 19 NFL tournament in Jacksonville surfaced on social media.

CLICK HERE TO GET THE FOX NEWS APP

In 2015, Facebook and Twitter, along with video sharing site YouTube, rushed to remove shocking video footage of the shooting of two television news journalists.

The Associated Press contributed to this article. Follow James Rogers on Twitter @jamesjrogers