Met says passing on clip of Isis militant murdering US journalist on social media could lead to prosecution under anti-terror laws

Scotland Yard has warned internet users they could be arrested under terrorism legislation if they viewed or shared the video of James Foley's murder, as Twitter and YouTube attempted to remove all trace of the footage from the web.

Twitter suspended dozens of accounts that published the graphic footage while YouTube tried to remove several copies of the video, which was first uploaded on Tuesday night.

Twitter CEO Dick Costolo tweeted: "We have been and are actively suspending accounts as we discover them related to this graphic imagery. Thank you."

The unprecedented social media clampdown came as the Metropolitan police warned that even viewing the video could constitute a criminal offence in the UK.

The force said in a statement: "The MPS counter-terrorism command (SO15) is investigating the contents of the video that was posted online in relation to the alleged murder of James Foley. We would like to remind the public that viewing, downloading or disseminating extremist material within the UK may constitute an offence under terrorism legislation."

The video was shared hundreds, if not thousands, of times by Twitter users who reacted with shock and horror at the slaying. But several Twitter accounts connected to British jihadis, who previously claimed to be fighting alongside Islamic State militants in Syria, were careful not to publish the video – most likely over fears that their accounts would be closed.

One of the Twitter users, who used the moniker Al Britaniyya, retweeted a photograph of a burning Stars and Stripes and said: "So the US want to bombarded us with air strikes in iraq and not give a damn whos killed but want cry when a dusty journalist is killed.

"By Allah we won't forget our muslim brothers and sisters who were killed by United States of shaytiaan the blood of a muslim is not cheap. And in time they to [sic] shall weep as our mothers weeped [sic] for their children." Another mocked the outpouring of grief for Foley and described journalists as "a cult within themselves". A third posted: "Why shouldn't America be angry after all an American life is worth 10x a Muslims."

The extremists are among many hundreds being closely monitored by the intelligence services. Raffaello Pantucci, director of international security studies at the Royal United Services Institute, studied the Twitter accounts of some prominent western Isis fighters.

He said: "They're all very gleeful about it. It seems to be the usual reaction of 'This is a wonderful thing' and 'Why does the world get so excited when an American is killed when dozens are killed in Gaza?' It's a classic reaction."