Each of the new cities was founded with a change in the governance of the Middle East: Fustat was the first Arab settlement in Egypt, founded by Amr ibn al-A'as in 642 following the Arab conquest of Egypt. Al-Askar succeeded Fustat as capital of Egypt after the move of the caliphate from the Umayyad dynasty in Damascus to the Abbasids in Baghdad around 750 CE. Al-Qata'i was established by Ahmad ibn Tulun when he was sent to Egypt by the Abbasid caliph to assume the governorship in 868 CE. Ibn Tulun arrived with a large military force that was too large to be housed in al-Askar. The city was founded on the Gabal Yashkhur, a hill to the northeast of the existing settlements that was said to have been the landing point for Noah's Ark after the Deluge, according to a local legend. Al-Qata'i was modelled to some degree after Samarra in Iraq, where Ibn Tulun had undergone military training. Samarra was a city of sections, each designated for a particular social stratum or subgroup. Likewise, certain areas of al-Qata'i were allocated to officers, civil servants, specific military corps, Greeks, guards, policemen, camel drivers, and slaves. The new city was not intended to replace Fustat, which was a thriving market town, but rather to serve as an expansion of it. Many of the government officials continued to reside in Fustat. The focal point of al-Qata'i was the large ceremonial mosque, named for Ibn Tulun, which is still the largest mosque in terms of area in Cairo. Among other architectural features, the mosque is noted for its use of pointed arches two centuries before they appeared in European architecture. The historian al-Maqrizi reported that a new mosque had to be built because the existing ceremonial mosque in Fustat, named for Amr ibn al-A'as, could not accommodate Ibn Tulun's personal regiment at the Friday prayer. Ibn Tulun's palace, the Dar al-Imara was built adjacent to the mosque and a private door allowed the governor direct access to the pulpit, or minbar. The palace faced a large parade ground and park, featuring gardens and a hippodrome. Ibn Tulun also commissioned the construction of an aqueduct to bring water to the existing town, and a maristan, the first such public institution in Egypt, founded in 873. An endowment was established to fund both in perpetuity. Ibn Tulun secured a significant income for the capital through various military campaigns, and many taxes were abolished during his rule. Following Ibn Tulun's death in 884, his son Khumarawayh focused much of his attention on enlarging the already lavish palace structures. He also built several irrigation canals and a sewage system in al-Qata'i. In 905, Egypt was reoccupied by the Abbasids, and, in retaliation for the Tulunids long military campaigns against the caliphate, the city was plundered and razed, leaving only the mosque standing. Administration was then transferred back to al-Askar, which had become geographically indistinct from Fustat. After the founding of al-Qahira in 969, Fustat/al-Askar and al-Qahira eventually grew together, building over the remains of the Tulunid capital and incorporating the Mosque of Ibn Tulun into the new urban landscape.