YouTube is taking action to remove any video of James Foley's murder on its site and close accounts belonging to terrorist organisations, it said today.

The company, part of Google, spoke after a campaign was launched on Twitter encouraging users not to share videos of the brutal killing by the Islamic State (IS), formerly the Islamic State in Iraq and Syria (Isis).

Using the hashtag #ISISmediablackout they urged people instead to share photos of the smiling American photojournalist before his capture in Syria in 2012.

The Metropolitan Police this afternoon warned that "viewing, downloading or disseminating extremist material within the UK may constitute an offence under Terrorism legislation".

This afternoon a YouTube spokesman said: "YouTube has clear policies that prohibit content like gratuitous violence, hate speech and incitement to commit violent acts, and we remove videos violating these policies when flagged by our users.

"We also terminate any account registered by a member of a designated foreign terrorist organisation and used in an official capacity to further its interests."

Twitter's chief executive Dick Costolo has earlier said the firm was taking action against accounts which spread the video, writing: "We have been and are actively suspending accounts as we discover them related to this graphic imagery. Thank you."

Thousands of people, including celebrities and scores of fellow journalists, took to social media to urge people not to give IS the oxygen of publicity.

Sunday Times photographer Paul Conroy said people spreading the video were doing IS's work for it.

Conroy, of Totnes, Devon, who was injured in Homs, Syria, in 2012 by a government artillery strike that killed reporter Marie Colvin, told BBC Radio 5: "In many ways the passing around of these pictures and the videos of James is essentially doing what these people - these murderers - want you to do.

"They want it to go viral, they want as many people in the world to look at it. So in many ways by sharing them and propagating, we fall into their hands.

"That's the reason why it's such a stage-managed event.

"What happened was stage-managed by people who are very, very media aware and they know too well that nothing can be banned on the internet so these images - the video - will go about."

Actress Mia Farrow were among those who urged their followers to shun the horrific beheading footage, which the Islamic State claimed showed the death of the 40-year-old American.

Rosemary's Baby star Farrow tweeted: "Blackout on group that murdered James Foley. Don't share video. Give them nothing. #RespectJamesFoley."