Egypt’s military has responded with air strikes directed at “terrorist” locations and vehicles after hundreds of people were killed in a bomb and gun assault on a mosque in the north of the country.
Egypt’s chief prosecutor, Nabil Sadeq, said the 305 people killed included 27 children, while a further 128 people were wounded in the attack on the al-Rawdah mosque in Bir al-Abed, north Sinai.
In the deadliest attack in the country in recent memory, a bomb ripped through the mosque as Friday prayers were finishing, before militants in four off-road vehicles approached.
Sadeq said the attack was carried out by 25 to 30 militants, who stationed themselves at the mosque’s main door and 12 windows before opening fire on worshippers inside.
More than 50 ambulances ferried casualties from the mosque, about 25 miles (40km) west of the city of Arish, to nearby hospitals. Pictures from the scene show rows of bloodied victims inside the mosque.
The Egyptian president, Abdel Fattah al-Sisi, delivered a defiant television address on Friday evening, vowing to respond with “brute force” and offering condolences to the families of victims.
“This act will only increase our will and unity,” he said. “The police and military will avenge our martyrs and restore peace and security.”
He added: “We will respond with brute force to combat these terrorists and deviants … This is an attempt to deter us from fighting terrorism and to destroy our will, but we are steadfast, and I say to all Egyptians, the battle you are fighting is the most honourable.”
Hours after the attack, Egypt’s military launched airstrikes on targets in mountainous areas around Bir al-Abed, security sources and witnesses said. The targets were described as vehicles used in the attack and “terrorist” locations where weapons and ammunition were stocked.
Sisi, a former armed forces commander who presents himself as a bulwark against Islamist militants in the region, convened an emergency security meeting with his defence and interior ministers and intelligence chief after the attack and declared three days of mourning.
One witness, a shop owner from Bir al-Abed, said local people heard a massive blast followed by gunfire. When he arrived at the site of the attack he saw people rushing to pick up the bodies and to offer help to the injured. He said he saw at least 20 bodies wrapped in cloths and blankets.
One resident whose relatives were at the scene told Reuters that the attackers shot at people as they left the mosque, and also at the ambulances. The attackers had also set alight nearby vehicles to try to block routes away from the mosque.
The mosque belongs to a Sufi order – a mystical branch of Islam whose followers are regarded by hardline Islamists as apostates because they revere saints and shrines.
An ISIS propaganda outlet has previously published an interview with the commander of its “morality police” in Sinai who said their “first priority was to combat the manifestations of polytheism including Sufism”.
The attack came days before the annual celebrations of the prophet Muhammad’s birthday. Festivals are being held by Sufi-affiliated mosques around the country.
Another witness, a student who gave his name only as Mohamed, told the Guardian he had heard calls for help emanating from other nearby mosques after Friday’s attack.
“I went with my family and friends to the scene of the mosque and found ambulances loading bodies and injured,” he said. “What happened in al-Rawdah is a massacre against peaceful civilians.”
Mohamed said residents went to every pharmacy and clinic they could to gather medicine and instruments for local hospitals treating the wounded.
“In the Ber al-Abd hospitals, there was chaos,” he said. “Blood and screaming were everywhere. We heard that [all] male members of one family were killed, the elders, the youth and the children.”
Striking at a mosque would be a change in tactics for the Sinai militants, who have usually targeted security forces since bloodshed in the Sinai worsened after Sisi led the overthrow of President Mohamed Morsi of the Muslim Brotherhood in 2013.
But jihadis have also targeted Sinai tribes working with the armed forces, branding them traitors for their cooperation.
In July, at least 23 soldiers were killed when suicide car bombs hit two military checkpoints in the Sinai, an attack for which ISIS claimed responsibility.
The local ISIS affiliate, Wilayat al-Sinai (the Governorate of Sinai), also carried out the previous deadliest attack in the region, when it downed a Russian passenger jet carrying tourists back from the resort of Sharm el-Sheikh in 2015, killing 224 people.
Militants have tried to expand beyond the largely barren, desert Sinai peninsula into Egypt’s heavily populated mainland, attacking Coptic Christian churches and pilgrims.
In May, gunmen attacked a Coptic group travelling to a monastery in southern Egypt, killing 29.
The grand imam of al-Azhar mosque in Cairo, the centre of Sunni learning, condemned the attack as an “attempt to spread chaos”.
“After targeting Christians, the turn for mosques have come,” he said in a statement. “As if terrorism wants to unite Egyptians in deaths and chaos, nevertheless it will be defeated, and the will of Egyptians will prevail.”
There was also international condemnation for the attack. The UN security council and Secretary-General António Guterres issued a statement calling the assault a “heinous and cowardly terrorist attack” and called for the perpetrators to be brought to justice.
“The world cannot tolerate terrorism, we must defeat them militarily and discredit the extremist ideology that forms the basis of their existence,” US President Donald Trump wrote on Twitter, calling the assault “horrible and cowardly”.
The UK foreign minister, Boris Johnson, condemned the “barbaric” assault, while his French counterpart, Jean-Yves Le Drian, expressed his condolences to the families of victims of the “despicable attack”.
Ahmed Aboul Gheit, head of the Arab League, which is based in Cairo, condemned the “terrifying crime which again shows that Islam is innocent of those who follow extremist terrorist ideology”, his spokesman said in a statement.