The Mosque of Ibn Tulun, one of the most important cultural heritages left to Egypt by the Turks, has been standing in all its glory for about 1,140 years. Built by Ahmad ibn Tulun, founder of Tulunids, the first independent dynasty of Turkic origin to rule Egypt, the complex is consists of bricks in its entirety, and it was completed in 879. Bearing traces of Abbasid and Samarra traditions, its spiral-shaped minaret distinguishes the mosque from the other religious buildings in Egypt. There are 19 entrance doors in the outer courtyard and 19 different doors in the inner courtyard of the mosque. The Mosque of Ibn Tulun is located northeast of Fustat, an old town located in Cairo.