A suicide bomber killed a Hamas security guard in the Gaza Strip near the border with Egypt on Thursday, the first such attack to hit the Palestinian militant group.

Four other members of Hamas were wounded in the bombing at the Rafah crossing, said Eyad al-Bozom, a spokesman for Gaza’s Interior Ministry. He said the attacker was not affiliated with the Islamic State and was “ideologically deviant.”

Hamas, which has regularly used suicide bomb attacks against Israel, denies that Islamic State militants have a presence in Gaza, but it is struggling against an array of shadowy extremist groups. The Egyptian government has accused Hamas of allowing Islamic State militants from Egypt’s Sinai Peninsula to have a safe haven in Gaza.

Israeli officials have also accused Hamas of cooperating with the Islamic State in the Sinai Peninsula.