ISMAILIA, Egypt -- They arrived in five SUVs, took positions across from the mosque's door and windows, and just as the imam was about to deliver his Friday sermon from atop the pulpit, they opened fire and tossed grenades at the estimated 500 worshippers inside. When the violence finally stopped, more than 300 people, including 27 children, had been killed and 128 injured.

The blasts shook the mosque, worshippers screamed and cried out in pain. A stampede broke out in the rush toward a door leading to the washrooms. Others tried desperately to force their way out of the windows.

Those who survived spoke of children screaming as they saw parents and older brothers mowed down by gunfire or shredded by the blasts. Some marveled at their narrow escape from a certain death. Some families lost all or most male members in the massacre.

Get Breaking News Delivered to Your Inbox

So composed were the militants that they methodically checked their victims for any sign of life after the initial round of blazing gunfire. Those still moving or breathing received a bullet to the head or the chest, the witnesses said. When the ambulances arrived they shot at them, repelling them as they got back into their vehicles and fled.

CBS News foreign correspondent Charlie D'Agata reports that Egypt's response to the massacre came as quickly as they could fire up their war planes. The Egyptian military released video Saturday claiming to show fighter jets targeting vehicles in Friday's attack that they said killed suspected militants inside.

Friday's assault was Egypt's deadliest attack by Islamic extremists in the country's modern history, a grim milestone in a long-running fight against an insurgency led by a local affiliate of the Islamic State of Iraq and Syria (ISIS). Al-Rawdah Mosque was in a sleepy village by the same name in Egypt's troubled northern Sinai, near the small town of Bir al-Abd.

A statement by the country's chief prosecutor, Nabil Sadeq, said the attackers, some masked, numbered between 25 and 30. Those with bare faces sported heavy beards and long hair, it added. Clad in military-style camouflage pants and black T-shirts, one of them carried a black banner with the declaration of the Muslim faith -- there is no God but Allah and Muhammad is his prophet. The banner matched those carried by ISIS, which has not claimed responsibility for the attack.

They also torched seven cars parked outside the mosque that belonged to worshippers, the statement added.

The chief prosecutor's statement was the most detailed account given by authorities and it generally agreed with what witnesses told The Associated Press on Saturday in the Suez Canal city of Ismailia, where some of the wounded are hospitalized.

"We knew that the mosque was under attack by (militants)," said witness Ebid Salem Mansour recalling the intense gunfire. Mansour, a 38-year-old worker in a nearby salt factory, said he had settled in Bir al-Abd three years ago to escape the bloodshed and fighting elsewhere in northern Sinai. He suffered two gunshot wounds to his legs on Friday.

"Everyone lay down on the floor and kept their heads down. If you raised your head you get shot," he said. "The shooting was random and hysterical at the beginning and then became more deliberate. Whoever they weren't sure was dead or still breathing was shot dead."

The militants were shouting Allahu Akbar, or God is great, as they fired at the worshippers and the children were screaming, Mansour added. "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. Amid the shooting many worshippers recited their final prayers, he added.

Friday's attack targeted a mosque frequented by Sufis, members of a mystic movement within Islam. Islamic militants, including the local ISIS affiliate, consider Sufis heretics because of their less literal interpretations of the faith.

President Abdel-Fattah el-Sissi vowed that the attack "will not go unpunished" and that Egypt would persevere with its war on terrorism. He did not specify what new steps might be taken. On Saturday, he ordered that a mausoleum be built in memory of the victims of Friday's attack and canceled a visit to the Gulf Sultanate of Oman that was scheduled for next week.

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

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 ISIS affiliate is also believed to be behind the 2016 downing of a Russian passenger jet that killed 224 people over Sinai, an incident that decimated the country's already ailing tourism industry.

Friday's assault was the first major militant attack on a Muslim congregation, and it eclipsed past attacks, even dating back to a previous Islamic militant insurgency in the 1990s. The death of so many civilians in one day recalls the killing of at least 600 in August 2013, when Egyptian security forces broke up two sit-in protests in Cairo by supporters of Mohammed Morsi, an Islamist president ousted by the military the previous month.

Another witness to Friday's attack said worshippers tried to jump out of windows as soon as the militants opened fire. "The small door that leads to the corridor for the wash rooms was about the only one where worshippers rushed to escape," said a 38-year-old government employee who did not want to be named for fear of retaliation.

"There was a stampede. I fell down and then bodies piled up on top of me," he said.

The local ISIS group affiliate has targeted Sufis in the past.

Last year, the militants beheaded a leading local Sufi religious figure, the blind sheikh Suleiman Abu Heraz, and posted photos of the killing online. ISIS propaganda often denounces Sufis. In the January edition of an ISIS online magazine, a figure purporting to be a high level official in the Sinai affiliate of the group vowed to target Sufis, accusing them of idolatry and heretical "innovation" in religion and warning that the group will "not permit (their) presence" in Sinai or Egypt.

Millions of Egyptians belong to Sufi orders, which hold sessions of ritual chanting and dancing to draw the faithful closer to God. Sufis also hold shrines containing the tombs of holy men in particular reverence.

Islamic militants stepped up their campaign of violence in northern Sinai after the military ousted the elected but divisive Morsi. Authorities followed up with a fierce crackdown on his Muslim Brotherhood group, jailing thousands.

The result has been a long, grinding conflict centered on el-Arish and nearby villages and towns in north Sinai. 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 and, more recently, Christians. Hundreds have been killed, although exact numbers are unclear. 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.