The death toll in Friday’s terrorist attack on a mosque in Egypt’s northern Sinai region has surpassed 300, including 27 children.

Egyptian President Abdel Fattah el Sisi has vowed to retaliate with brute force for the attack on Al Rawdah mosque that left 305 dead and 128 injured.

“What is happening is an attempt to stop us from our efforts in the fight against terrorism,” Sisi said in a televised address. “The armed forces and the police will avenge our martyrs and restore security and stability with the utmost force.”

Hours after the massacre, the military initiated airstrikes on terrorist locations around Bir al-Abed, about 25 miles west of North Sinai’s main city Al-Arish, where weapons, ammunition were reportedly stocked. Several vehicles used in the attack had been located and bombed, an army spokesperson said.

'Children were screaming'

Witnesses told the Associated Press of people jumping out of windows, a stampede in a corridor leading to the restrooms and of children screaming in horror. Some spoke of their narrow escape from a certain death, others of families that lost all or most of their male members.

The militants were shouting "Allahu akbar" ("God is great") and the children were screaming, Mansour said.

"I knew I was injured but I was in a situation that was much scarier than being wounded. I was only seconds away from a certain death," he said. As the shooting took place, many of the worshippers recited their final prayers, he added.

Friday’s attack targeted a mosque frequented by Sufis, members of a mystic movement within Islam. Although no one has claimed responsibility for the attack, Islamic militants, including the local affiliate of the Islamic State group, consider Sufis heretics because of their less literal interpretations of the faith. IS-affiliated groups have targeted Sufis in the past.

Egypt has been in a state of emergency since April. The military and security forces have already been waging a tough campaign against militants in the towns, villages and mountains of Sinai. Across the country, thousands have been arrested in a crackdown on suspected terrorists as well as dissenters and critics, raising concern about human rights violations.

Deadly bombings

Seeking to spread the violence, militants over the past year have carried out deadly bombings on churches in the capital of Cairo and other cities, killing dozens of Christians. The IS affiliate is also believed to be behind the 2016 downing of a Russian passenger jet that killed 226 people over Sinai.

Islamic militants stepped up their campaign of violence in northern Sinai after the military ousted the elected but divisive Islamist Mohammed Morsi from power in 2013 and launched a fierce crackdown on his Muslim Brotherhood group.

The result has been a long, grinding conflict centered on el-Arish and nearby villages and towns. The militants have been unable to control territory, but the military and security forces have also been unable to bring security, as the extremists continuously carry out surprise attacks, mostly targeting outposts and convoys.

The attacks have largely focused on military and police, killing hundreds, although exact numbers are unclear as journalists and independent investigators are banned from the area. The militants have also assassinated individuals the group considers to be spies for the government or religious heretics. Egypt has also faced attacks by militants in its Western Desert.

The Associated Press contributed to this report.