Hamas has once again foiled an Islamic State attempt to set up a terror infrastructure in Gaza, a security official in the Strip told Breitbart Jerusalem.

Despite a similar failure a few months ago, IS tried to launch an affiliate this week that would be directly subordinate to the organization’s leadership abroad.

Hamas security has successfully intercepted an infiltration attempt by a native of Rafah, near the Egyptian border, who sought to return to the Strip after a long and successful stint fighting for IS in Syria, the security said.

The jihadi met with Salafi activists in a bid to set up militant cells to carry out attacks against Hamas, Israeli, and Egyptian targets along the border.

As part of the campaign this week, six Salafi activists were arrested, according to the official. The IS ringleader, however, escaped arrest and likely slipped out of Gaza back to Sinai.

Interrogated by Hamas police, the six detainees admitted that they were recruited to set up an IS infrastructure in the Strip, but were arrested before they got the chance, the official revealed.

IS militants already have cells in Gaza. IS-linked groups have taken responsibility for rocket attacks targeting Jewish civilian population zones, and they have clashed with Hamas on numerous occasions.

In July, Breitbart Jerusalem reported that Hamas foiled a large-scale attack on Gaza government institutions, facilities, and officials that was planned by Islamic State loyalists.

According to a Hamas official at the time, ten jihadi activists from the southern Gaza Strip were arrested by Hamas on the last day of Ramadan, and admitted that they had pledged allegiance to IS leader Abu Bakr al-Baghdadi.

Hamas police seized large sums of money and weapons that were presumably to be used against Hamas targets, the official said, predominantly the internal security department, which is in charge of imposing a ban on rocket fire. Several Hamas officers were accused of torturing the suspects.

The suspects allegedly admitted to having planned the attack independently of IS headquarters in Syria and Iraq, but were inspired by the organization and adhered to its ideology, the official said. Dozens of other jihadists who have gone underground are expected to be arrested over the coming days, as information on their whereabouts emerges from the investigation.

Earlier in July, Breitbart Jerusalem reported that Hamas arrested six jihadists who returned from fighting for IS in Sinai.

The six, who returned to Gaza separately, were sent by IS’s Sinai branch to review the feasibility of setting up an IS chapter in the Strip that would attempt to unify all currently active Salafi organizations under the banner of IS, a Hamas official said.

The Sinai has become one of the region’s top IS zones. Breitbart Jerusalem reported that, in the month of April alone, 12 jihadists departed Gaza to join the Islamic State in the Sinai.

The recruitment of Gazan jihadists by IS in Sinai comes after a top jihadist official threatened in a recent exclusive interview on “Aaron Klein Investigative Radio” that it is only a matter of time before the Islamic State’s branch in the Sinai carries out a “big operation” in the Israeli resort town of Eilat and other parts of southern Israel.

IS has also set its sights on countering Hamas in Gaza. Last year, Hamas engaged in deadly clashes with IS supporters who challenged Hamas rule.

Last July, the Information Bureau of the Aleppo Province, affiliated with IS, released a video entitled “A message to our folks in Jerusalem,” in which ISIS members originally from Gaza declared war on Israel and Hamas.

In the video, IS member and Gaza native Abu Azzam al-Ghazzawim delivered a strongly-worded warning to what he called the “tyrants of Hamas”:

You are nothing in our reckoning. You, Fatah, and all the secularists, we count you as nothing. Allah willing, we shall uproot the state of the Jews. You are nothing but froth that will be gone as we move in. Allah willing, Gaza will be governed by Shariah despite you.

Abu Qatadah al-Filistini, an IS member who leads a faction in Aleppo, Syria, made an appearance in the video and called on all “monotheists in Gaza to join the convoy of the Muhajidin and to join the State of the Caliphate.”

Abu Qatadah accused Hamas of “sliding gradually into apostasy, a slide that started with the demolition of the Ibn Taymiyah Mosque. … It is a movement that does not seek to govern according to Shariah but seeks to appease Iran and America, the heads of apostasy.”

The latest attempt comes at a sensitive time for IS, as the organization is suffering one defeat after another in Syria, Iraq, Libya, and the Sinai Peninsula.

However, local sympathizers told Breitbart Jerusalem that the difficulties on the battlefield have not in the least affected their support for the organization and its ideology, even though IS roundly rejected numerous requests by Gaza Salafists to be recognized as an official affiliate.

Hamas, for its part, continues to undermine IS’s attempts to consolidate its presence in the Strip and threaten their central authority.