Updated

Egypt is reeling from the horrific militant attack on a mosque in northern Sinai that killed 305 people two days ago.

It was the deadliest assault by Islamic extremists in the country's modern history and a grim milestone in a long-running fight against an insurgency led by a local affiliate of the Islamic State group.

Survivors and Egypt's top prosecutor have given accounts of the massacre that unfolded as more than two dozen masked assailants, carrying a black IS banner, unleashed gunfire and explosions at the mosque during Friday prayers in the small town of Bir al-Abd.

Witness Ebid Salem Mansour recalled how the attackers shouted Allahu Akbar, or God is great, as they fired on the worshippers.

The targeted mosque is frequented by Sufi Muslims, whom IS considers heretic.