Facebook has taken down a video of a woman being beheaded and said it would apply more stringent criteria when deciding whether to allow such images on the site after it was criticised for refusing to remove the footage.

News that Facebook had lifted a ban on images of graphic violence prompted a public outcry on Tuesday, with the UK prime minister, David Cameron, joining condemnation of the decision.

In response, the social networking site has backed down and removed the video, which shows a masked man beheading a woman in Mexico.

"When we review content that is reported to us, we will take a more holistic look at the context surrounding a violent image or video," it said in a statement on Tuesday.

"Second, we will consider whether the person posting the content is sharing it responsibly, such as accompanying the video or image with a warning and sharing it with an age-appropriate audience."

Facebook bans displays of topless photos of women under rules addressing nudity and pornography, but its owners had initially resisted suggestions that the Mexican video should be taken down, arguing that the public should be free to view beheading videos then condemn the content. It said it would take a different approach if the actions in the footage were "encouraged or celebrated".

Following complaints, the website's owners added captions to the front of videos warning that they contained extremely graphic content and that they "may be upsetting". But that was not enough to mollify the prime minister, who said Facebook should explain its decision to "worried parents". Facebook allows people to use the site from the age of 13, although many 11-year-olds join when they go to secondary school.

Hostage UK, a charity representing the families of people who have been kidnapped and killed, said: "The public are well aware of the brutalities committed, and a public showing … adds nothing other than to cause further unimaginable suffering."

On Tuesday, Facebook caved into the pressure and admitted it had been wrong to refuse to remove the beheading video.

"Based on these enhanced standards we have re-examined recent reports of graphic content and have concluded that this content improperly and irresponsibly glorifies violence. For this reason we have removed it," the company said.

Facebook had introduced a temporary ban on such videos in May but later decided to remove the block on the grounds that the site is used to share information about world events.