 In the 14th century there was a very destructive earthquake and the whole building was completely destroyed.About 1480 AD, the Circassian Mameluke Sultan Al-Ashraf Qaitbay fortified the place as part of his coastal defensive edifices against the Turks, who were threatening Egypt at that time.He built the fortress and placed a mosque inside it.