The Muslims pursued the retreating Byzantines, and laid siege to Alexandria. The siege dragged on for some time. The Byzantines within Alexandria became the victims of mutual dissension. Ibn Bassama a gate-keeper of one of the gates contacted the Muslims, and offered to open the gate to the Muslims, in case he was granted amnesty. 'Amr b Al 'Aas accepted the offer. One night the gate was opened, and the Muslim force rushed inside the city. In a hand to hand fight that followed the Byzantines were defeated, and the Muslims recaptured the city. On occupying the city, Amr b Al 'Aas had the walls of the city demolished to prevent the enemy from taking shelter within the city. The Copts who had remained loyal to the Muslims were duly compensated for the losses they had suffered because of the invasion of the Byzantines. After reorganizing the administration of Alexandria, 'Amr b Al 'Aas returned in triumph to Fustat.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari