Egypt’s first mosque was named after the Arab general Amr Ibn al-As, a contemporary of the Prophet Mohammed who conquered the Roman rulers of Egypt in 640 CE on behalf of the burgeoning Islamic empire. The first structure built on this site was begun in 641 CE.
Legend has it that when Amr Ibn al-As was preparing for battle, a dove laid an egg in his tent. When he returned victorious, the egg was taken as an omen of good fortune, so a city (Fustat) grew around the spot where it was laid, and the mosque was central to its founding.
The original structure was made of wood, stone, and mud brick. The oldest surviving parts of the current structure are a few doorframes believed to have been added around 827 CE. The mosque has been razed, rebuilt, and restored a few times, one notable instance being after the Egyptian vizier Shawar ordered it and the entire city destroyed by fire in 1169 to prevent the Crusaders from capturing it. The famous Arab general Saladin, after defeating the Crusaders, had the mosque rebuilt in 1179.
The mosque remains an active place of worship.