The death toll after a militant attack on a mosque in Egypt's North Sinai has risen to 305 killed, including 27 children, and 128 more people were wounded, MENA state news agency said on Saturday.

Gunmen attacked the al-Rawdah mosque during Friday prayers, setting off explosives, shooting worshippers and blocking their escape routes.

Relatives of injured worshippers grieve outside the Suez Canal University hospital in Ismailia, Egypt on Saturday. (Amr Nabil/Associated Press)

The militants targeted a mosque frequented by Sufis, members of a mystic movement within Islam. Islamic militants, including the local affiliate of ISIS (Islamic State in Syria and Iraq), consider Sufis heretics because of their less literal interpretations of the faith.

Egypt's chief prosecutor Nabil Sadeq said in a statement the attack was carried out by 25 to 30 men who arrived at the mosque in the small town of Bir al-Abd in five all-terrain vehicles. He said the militants stationed themselves at the mosque's main door and 12 windows before opening fire on worshippers inside.

Extremists attacked the al-Rawdah mosque, 40 kilometres from the North Sinai provincial capital of el-Arish, opening fire from five off-road vehicles on worshippers inside during the sermon, three police officers said. (Curious Maps)

They also torched seven cars belonging to the worshippers that were parked outside.

No one claimed responsibility for the attack, but ISIS has repeatedly declared that it views Sufis as heretics and vowed to rid Sinai, and Egypt, of them. Millions of Egyptians practise Sufi rituals, like reciting poetry, dancing and singing as means to be closer to God.

Egypt's military says warplanes have struck several vehicles that may have been used in the attack..

The military's Saturday statement said the vehicles were hit in the vicinity of the previous day's attack in Bir al-Abd.