Cairo — Egypt mourned on Saturday as the death toll from a gun and bomb assault on a mosque in the Sinai Peninsula soared above 300, including children, in the deadliest attack the country has witnessed.
The army said warplanes had struck militant hideouts in the insurgency-wracked North Sinai in retaliation.
According to the state prosecution, up to 30 militants in camouflage flying the Islamic State (IS) group’s black banner had surrounded the mosque and massacred the worshippers during weekly Friday prayers.
Twenty-seven children were among the dead, it said.
IS has not claimed responsibility for the attack, but it is the main suspect as the mosque is associated with followers of the mystical Sufi branch of Sunni Islam whom it has branded heretics.
Funerals for the victims were held overnight and many were buried unwashed in their bloodied clothes, according to the Islamic burial practices for martyrs, security and medical officials said.
Egypt’s President Abdel Fattah al-Sisi declared three days of mourning and vowed to "respond with brutal force" to the attack, among the deadliest in the world since the September 11, 2001 attacks on the United States.
"The army and police will avenge our martyrs and return security and stability with force in the coming short period," he said in a televised speech.
Hours later Egyptian air force jets pursued the "terrorists and discovered several vehicles used in the terrorist attack, killing those inside near the vicinity of the attack", an army spokesman said.
The state prosecutor’s office said in a statement that 305 people were killed and 128 wounded in the assault on the Rawda mosque in a village roughly 40 kilometres west of the North Sinai capital of El-Arish.
It said the attackers, with long beards and hair often seen on jihadists, arrived in five all-terrain vehicles and surrounded the mosque.
Witnesses said they heard gunshots and explosions before the assailants entered the mosque, according to the prosecution.
"Nobody in that mosque escaped unharmed," said the brother of the mosque’s imam, or prayer leader, Mohamed Abdel Fattah.
"He was shot in the foot," the brother, Ahmed, said, adding that the religious leader was still in "too much shock" to speak.
One of the wounded, Magdy Rizk, claimed that assailants wore masks and military uniforms, and that extremists had previously threatened people in the area.
Relatives visited victims in hospital in the city of Ismailia near the Suez Canal where the wounded were taken for treatment.
Locals and relatives of people living in the village where the attack happened said the Rawda mosque was prominent.
"This is the largest mosque in the area. It is the parent mosque, where events take place, funerals and weddings. When full it has 600 or 700 people," said Ahmed Sweilam, whose cousins live in the village.
"Darkness pervades the village now." World leaders voiced outrage. US President Donald Trump denounced on Twitter the "horrible and cowardly terrorist attack on innocent and defenceless worshippers".
Horrible and cowardly terrorist attack on innocent and defenseless worshipers in Egypt. The world cannot tolerate terrorism, we must defeat them militarily and discredit the extremist ideology that forms the basis of their existence!— Donald J. Trump (@realDonaldTrump) November 24, 2017
Sheikh Ahmed el-Tayeb, the grand imam of Cairo’s Al-Azhar, Egypt’s highest institution of Sunni Islam, condemned "in the strongest terms this barbaric terrorist attack".
Israel’s Prime Minister called for unity against "terrorism", saying: "Terrorism will be defeated even more quickly if all countries work against it together." The Egypt branch of IS has killed hundreds of policemen and soldiers, and also civilians accused of working with the authorities, in attacks in the north of the Sinai peninsula.
They have also targeted Sufis as well as Christians.
A tribal leader and head of a Bedouin militia that fights IS said that the Rawda mosque is known as a place where Sufis gather.
IS views Sufis as heretics for seeking the intercession of saints.
The group has also killed more than 100 Christians in church bombings and shootings in Sinai and other parts of Egypt, forcing many to flee the peninsula.
The military has struggled to quell the jihadists who pledged allegiance to IS in November 2014.
The jihadists have since increasingly turned to civilian targets, attacking not only Christians and Sufis but also Bedouin Sinai inhabitants accused of working with the army.
The group also claimed the bombing of a Russian plane that killed all 224 people on board after takeoff from the Egyptian Red Sea resort of Sharm el-Sheikh on October 31, 2015.
Aside from IS, Egypt also faces a threat from Al-Qaeda-aligned jihadists who operate out of neighbouring Libya.
A group calling itself Ansar al-Islam — Supporters of Islam in Arabic — claimed an October ambush in Egypt’s Western Desert that killed at least 16 policemen.
The military later conducted air strikes on the attackers, killing their leader.