Islamic State sympathizers in the Gaza Strip are making their presence felt on social media, but the enclave's Hamas rulers said on Thursday the group has no real foothold in the Palestinian territory.

Statements signed "Supporters of the Islamic State" have appeared recently on Twitter and several websites, accusing the Islamist group Hamas of arresting dozens of jihadists and threatening attacks in Gaza unless they are released.

Hamas said it had detained what it described as "lawbreakers" after an explosion earlier this month near a Hamas security headquarters and another blast outside the headquarters of the United Nations Relief and Works Agency.

A senior security official loyal to Hamas described the explosions, for which no group has claimed responsibility, as no more than "noise bombs", saying Islamic State existed "only on the Internet" in Gaza.

Sami Abu Zuhri, a Hamas spokesman, said "there is nothing called the Islamic State in the Gaza Strip", adding that the group only had "some supporters" in the territory.

"We do not fight people because of what they think, but at the same time, we do not allow any violations of security, whether by groups or individuals," Abu Zuhri said.

Gaza-based political analyst Hani Habib said some activists identifying with ultra-conservative Salafi Islam were using social media to try to draw the attention of Islamic State and seek its recognition.

"They were inspired by the presence of ISIS in Iraq and Syria and moreover in the Egyptian Sinai peninsula," said Habib, dismissing any notion that Salafis in Gaza had formally joined Islamic State.

Islamic State, an ultra-hardline offshoot of al Qaida, has declared a caliphate in captured territory in Iraq and Syria and has gained global notoriety for posting gruesome videos of its members killing captives. It is sometimes referred to as ISIS.

Salafi groups began to surface in Gaza in 2006 and have had a tense relationship with Hamas, which seized the territory from forces loyal to the Western-backed Fatah group in 2007.

A senior Israeli security official said it was hard to assess whether there was a serious Islamic State presence in Gaza. "There are lots of these hardline, 'right-of-Hamas' Islamist groups operating in Gaza. That's been the case for years.

So if one decides to change its name to something ISIS-related, that's not in itself so significant," said the official, who spoke on condition of anonymity. "The fact is that Hamas is trying to curb them, and mainly because they are a threat to its rule."