Egypt’s President Abdul Fattah al-Sisi has vowed to respond with “the utmost force” after 300 people were killed at a North Sinai mosque during Friday prayers.
The al-Rawda mosque in the town of Bir al-Abed was bombed and fleeing worshippers were then gunned down.
The Egyptian military has said it has conducted air strikes on “terrorist” targets in response.
No group has yet claimed the attack, the deadliest in recent memory.
After bombs were set off, dozens of gunmen waiting outside the mosque opened fire on those trying to escape.
The assailants reportedly set parked vehicles on fire in the vicinity to block off access to the building, and fired on ambulances trying to help victims.
Thirty children are among the dead and at least 100 people have been wounded.
“What is happening is an attempt to stop us from our efforts in the fight against terrorism,” Mr Sisi said in a televised address hours after the attack.
“The armed forces and the police will avenge our martyrs and restore security and stability with the utmost force.”
Egyptian security forces have for years been fighting an Islamist insurgency in the Sinai Peninsula, and militants affiliated with so-called Islamic State (IS) have been behind scores of deadly attacks in the desert region.
Who was targeted?
Locals say the al-Rawda mosque is used by the local Sawarka tribe, which is known to cooperate with the security services against militants.
It is also known to be popular with worshippers of Sufism, a mystical branch of Islam that is condemned by some jihadist groups.
The head of IS’s “religious police” in Sinai said last December that Sufis who did not “repent” would be killed, after the group beheaded two elderly men reported to be Sufi clerics.
The number of victims is unprecedented for an attack of this type, says the BBC’s Sally Nabil in Cairo. She adds that this is the first time that worshippers inside a mosque have been targeted by militants in North Sinai.
How has Egypt responded?
An army spokesman said “terrorist spots”, where weapons and ammunition were reportedly stocked, had been bombed by air force jets on Friday in response.
The official also said that several vehicles used in the attack had been located and destroyed.
Three days of national mourning have been declared.
Which militants operate in the area?
Militant Islamists stepped up attacks in Sinai after Egypt’s military overthrew Islamist President Mohammed Morsi following mass anti-government protests in July 2013.
Hundreds of police, soldiers and civilians have been killed since then, mostly in attacks carried out by the Sinai Province group, which is affiliated to IS.
Sinai Province has also carried out deadly attacks against Egypt’s Coptic Christian minority elsewhere in the country, and said it was behind the bombing of a Russian plane carrying tourists in Sinai in 2015, killing 224 people on board
It has been operating mainly in North Sinai, which has been under a state of emergency since October 2014, when 33 security personnel were killed in an attack claimed by the group.
Sinai Province is thought to want to take control of the Sinai peninsula in order to turn it into an Islamist province run by IS.
Journalists, including from state-sponsored outlets, have not been allowed to report from North Sinai in the last few years.
Correspondents say that the frequency of attacks raises doubts about the effectiveness of military operations against militants.
What has the reaction been internationally?
Arab League chief Ahmed Aboul Gheit condemned the attack as a “terrifying crime which again shows that Islam is innocent of those who follow extremist terrorist ideology”.
Governments in the UK, US, France, Russia, Israel, Iran, Saudi Arabia and elsewhere have deplored the massacre.