The Tulunids established the first independent state in Egypt during the Abbasid period, during which Egypt was able to keep all of its wealth. Ahmad ibn Tulun, the founder of the dynasty, initiated many economic and cultural reforms. He started by establishing a new administrative center, called al-qata’I, where he built his mosque, currently known as the Ibn Tulun mosque. The Tulunids ruled for about thirty-five years, after which came the Ikhshids.