On Sunday afternoon, a US police officer named Michael Langsdorf was fatally shot in the back of the neck while responding to a report of someone trying to cash a bad check at a store.

A store clerk livestreamed Langsdorf's final moments on Facebook. The video has since been removed, but copies have surfaced on YouTube.

The YouTube videos have accrued thousands of views, and one version was among the top search results for Michael Langsdorf on the video platform.

The incident has echoes of the Christchurch, New Zealand, mosque massacre from March and serves as a reminder that tech firms are struggling to stem the tide of graphic content.

YouTube removed the videos. A Facebook spokeswoman said that when people die the company works to "minimize painful and jarring experiences for their friends and family."

Visit Business Insider's homepage for more stories.

Facebook and YouTube are dealing with a fresh example of graphic video broadcasting on their platforms after a US police officer was filmed bleeding to death on Sunday.

The officer, Michael Langsdorf, had responded to a report of someone trying to pass a bad check in a store near St. Louis at roughly 4:30 p.m. on Sunday.

After arriving, Langsdorf confronted the suspect, named by the police as Bonette Kymbrelle Meeks, 26. According to the North County Police Cooperative, a struggle ensued and the two men ended up on the floor.

The police said Meeks pulled a gun from his waistband, managed to stand up over Langsdorf as he lay facedown, and shot him in the back of the neck. He was pronounced dead at 5:15 p.m.

The chaos following the shooting was livestreamed on Facebook by a clerk at the store, Kashina Harper. In the three-minute video, a police officer can be seen lying facedown, with blood pooling around his chest.

Harper and others shout for help, and other police officers arrive. They can be heard repeating Langsdorf's name multiple times.

Read more: Facebook is dialing up punishments for users who abuse live video after the Christchurch massacre

At a press conference on Monday, North County Police Cooperative Maj. Ron Martin said the force had done its "due diligence" in removing the video from Facebook, which he described as showing Langsdorf's "final moments." It is not clear whether Facebook or Harper removed the video.

Since the video was taken down, however, copies have appeared on YouTube. Business Insider identified at least two versions of the footage, one of which appeared among the top search results for Michael Langsdorf.

Both versions of the video carry the warning "This video may be inappropriate for some users," followed by a message that says "I understand and wish to proceed." Together, the videos have been viewed nearly 15,000 times.

A version of Kashina Harper's Facebook livestream, as it appears on YouTube. YouTube

YouTube removed the videos after they were flagged by Business Insider for violating its rules on graphic content. A spokeswoman did not comment further.

A Facebook spokeswoman told Business Insider: "When people pass away, we work to minimize painful and jarring experiences for their friends and family. We have Community Standards and remove anything that violates them, including violence and graphic content. In addition to these policies, family of the deceased can use the violent death contact form available in our Help Center to request video or photos showing the death of a loved one be removed."

Harper told the St. Louis CBS affiliate KMOV that she filmed the incident to get "justice" for the wounded Langsdorf. "I don't know why I went to Facebook. I don't know," she said. "I regret it. I didn't know the officer was going to die."

Harper experienced fierce criticism on Facebook for sharing the video, with commenters saying it was insensitive. She told the St. Louis Post-Dispatch she had received death threats. The Post-Dispatch was also criticized after it posted a link to the live video, for which it subsequently apologized.

A shooting with echoes of the Christchurch mosque massacre for Facebook and YouTube

The incident serves as an uncomfortable reminder that Facebook and YouTube are struggling to deal with graphic content being livestreamed and shared across their platforms.

Facebook's chief operating officer, Sheryl Sandberg. Getty

Though not on the same scale, the latest video has echoes of the Christchurch, New Zealand, mosque massacre from March, when the shooter broadcast his killing spree live on Facebook. It subsequently spread across platforms including YouTube and the Facebook-owned Instagram.

At the time, Facebook's chief operating officer, Sheryl Sandberg, said "we must do more" to prevent harmful content from being streamed live on the social network. YouTube CEO Susan Wojcicki said the mosque attack video provoked the platform into taking "unprecedented" action.

On Monday, the North County Police Cooperative said it had charged Meeks with first-degree murder, armed criminal action, unlawful possession of a firearm, and felony resisting.