Gunmen who abducted four Palestinians in Egypt's restive Sinai Peninsula are members of the local Islamic State (Isis) offshoot that recently claimed responsibility for the beheading of a Croatian national, security officials told Palestinian media.

The four were kidnapped as they were travelling from Gaza to Cairo on a bus with about 50 more Palestinians, earlier this week. About half an hour after it passed the Rafah crossing the vehicle was ambushed by masked militants, who stopped it by firing rounds in the air.

The gunmen forced the four off the bus after checking passengers' names on a laptop, allowing the others to proceed, AFP news agency reported.

Hamas, which dominates Gaza, condemned the kidnapping and urged the Egyptian government towards hostages' liberation.

No group has claimed responsibility for the incident but Palestinian news agency Ma'an quoted Egyptian officials as saying it was the work of Sinai Province, an Islamist group allied to IS.

The officials said the four abductees are Hamas members that the jihadi cell will use to bargain for the release of dozens of Gaza-based Salafists held by Hamas.

Ma'an named the four hostages as Abd al-Basit Abd al-Dayim, Abdullah Said Abdullah Abu Jibbeen, Yasir Fathi Misbah Zanoun and Hussein Khamis al-Thabda, adding that Hamas and the Sinai Province group had begun negotiating a swap.