 Restoration began in the period of Ahmed Ibn Tulun (about 880 AD).During the 11th century an earthquake occurred, causing damage to the octagonal part.The bottom survived, but it could only serve as a watchtower, and a small mosque was built on the top.