Prime Minister Benjamin Netanyahu’s office has deleted a controversial tweet that used an image from a graphic beheading video released by the Islamic State terrorist group.

After coming under widespread criticism, Netanyahu’s office took down the hours-old tweet, which contained an image of the late journalist James Wright Foley.

A campaign on social media has sought to dissuade Twitter users and media outlets from disseminating both the video or images from it out of respect for Foley’s family and to deny a propaganda coup to the jihadist group Islamic State (previously the Islamic State of Iraq and al-Sham, or ISIS), which murdered Foley.

The deleted Israeli tweet, which has been posted on BuzzFeed, juxtaposed an image, labeled “ISIS,” of Foley with his black-clad executioner with blade in hand alongside a picture, labeled “Hamas,” of a body being dragged through a street behind a motorcycle. The tweet was labeled “Hamas is ISIS. ISIS is Hamas,” repeating a statement made on Wednesday by Netanyahu.

A few hours later, the tweet was deleted after the Prime Minster’s office received criticism for using the image, according to the Wall Street Journal. Shortly after midnight on Friday, it was replaced by a similar tweet, supplanting the image of Foley with the ISIS logo in white against a black background.

The prime minister’s office has stood by the sentiment expressed in the tweets. On Friday night, the office released a similar tweet, this time juxtaposing images of ISIS and Hamas performing public executions.