Greek slaves, as well as a mercenary corps composed mostly of Greeks—became the foundation of Ibn Tulun's power and independence. For his personal protection, Ibn Tulun reportedly employed a corps of ghilmān from Ghur. Ibn Tulun's stepfather Bakbak was murdered in 869/70, but luckily for him in the summer of 871 the supervision of Egypt passed to his father-in-law Yarjukh. Yarjukh not only confirmed Ibn Tulun in his post, but in addition conferred to him the authority over Alexandria and Barqa. In 873, Ibn Tulun entrusted the government of Alexandria to his eldest son, Abbas. Ibn Tulun's growing power was manifested in the establishment of a new palace city to the northeast of Fustat, called al-Qata'i, in 870. The project was a conscious emulation of, and rival to, the Abbasid capital Samarra. Just like Samarra, the new city was designed as quarters for Ibn Tulun's new army with the aim of reducing frictions with the urban populace of Fustat. Each unit received an allotment or ward (whence the city's name) to settle, after which the ward was named. The new city's centrepiece was the Mosque of Ibn Tulun, which was built in 878–880 under the supervision of the Mesopotamian Christian architect Ibn Katib al-Farghani. A royal palace adjoined the mosque, and the rest of the city was laid out around them. Beside government buildings, it included markets, a hospital () that provided services free of charge, and a hippodrome. Nevertheless, Ibn Tulun himself preferred to reside in the Coptic monastery of Qusayr outside Fustat. Ibn Tulun's new regime The administration of Egypt was already well developed before Ibn Tulun's arrival, with a number of departments (s) responsible for the collection of the land tax, the supervision of the post, the public granaries (), the Nile Delta lands (), and possibly a privy purse () for the governor's personal use. A chancery () possibly also already existed, or else was established under Ibn Tulun, when he remodelled the Egyptian administration after the Abbasid central government. Most of the officials employed by Ibn Tulun were like him trained in the caliphal court at Samarra. Ibn Tulun's chancellor was the capable Abu Ja'far Muhammad ibn Abd al-Kan (died 891), while other important positions in the administration were held by the four Banu al-Muhajir brothers and Ibn al-Daya. Al-Balawi also reports several anecdotes about Ibn Tulun's extensive use of spies and his own ability