Hamas is facing an unprecedented challenge, this time from even more extreme elements within Islam and Gaza.
It is responding by radicalising even further, imposing Islamic dress on schoolgirls, militarily crushing a breakaway mosque preacher and his followers, and undertaking a propaganda push in mosques and on the web.
The source of the pressure on the Hamas leaders is the Jihadi-Salafi Muslims, who believe in returning Islam to what they see as its pure form that existed at the time of Mohammed and his companions, and in using holy war to achieve this.
While tens of thousands of Gazans may support their ideas, the number of hardcore armed activists is believed to be small.
“The challenge of their ideas is much more problematic for Hamas than their military power,” said Reuven Paz, director of the Israel-based Project for the Research of Islamist Movements.
Still, there has been a recent flare-up of border violence with Israel, which Dr Paz said is being spearheaded on the Palestinian side by Jihadi-Salafis, against the wishes of Hamas.
The latter is believed to be wary of prompting another devastating Israeli military operation following last winter’s Operation Cast Lead.
On Tuesday, an Israeli airstrike on a tunnel used for smuggling items into the Gaza Strip killed three people — all of them smugglers — and wounded seven.
A day earlier, a Palestinian cross-border mortar attack had lightly wounded a soldier. The mortar fire came after soldiers fired at three figures, apparently armed militants, near the border fence, killing one and wounding another.
Inspired partly by Osama bin Laden, the Jihadi-Salafis excoriate Hamas for not implementing full Islamic law, and for being compromising towards the West and Israel, including by abiding by the ceasefire that followed the Gaza war. There are also Salafis who do not believe in using violence to achieve their goals.
To silence the doctrinal threat, Hamas recently instituted a new regime for sermons during Friday mosque prayers. All mosques are now required to conform with a uniform message devised by Hamas religious officials.
Hamas’s abandonment of the skirt and blouse worn by Palestinian schoolgirls in favour of the jilbab, a traditional long robe, is also seen as a response to the Salafi challenge.
“The main Salafi criticism is ‘why are you not making Islamic law the law and why are you saying you are the Palestinian Authority’, which is based on secular law? Hamas is responding to this with visible steps aimed at giving a more Islamic character to its rule,” said Dr Paz.
They have also used crushing military force. Earlier this month, Hamas attacked an armed Salafi group, the Warriors of God, killing 28 people in the southern Gaza town of Rafah, including Abdul-Latif Moussa, the group’s leader. He had just given a sermon declaring an Islamic emirate in place of Hamas rule.
Poor quality pictures released this week by Hamas’s rival, Fatah, appeared to show two cases of Hamas executing members of the group at close range.
Hamas’s Palestinian Information Centre website is, meanwhile, trying to discourage any sympathy for the Warriors of God. In recent days it has highlighted statements by a Kuwaiti Salafi leader, Sheikh Hamed Ali, saying that the Warriors of God challenge to Hamas was an example of infighting prohibited by god.
“The Hamas movement and government are known for their honourable jihadist path,” the sheikh said. The fighting, he added “can only make the Zionists and their collaborators happy”.