later burned down during the Crusades. Cairo was later built in the year 986 to grow to become the largest and richest city in the Arab caliphate, and one of the biggest and richest in the world. The Abbasid period was marked by new taxations, and the Copts revolted again in the fourth year of Abbasid rule. At the beginning of the 9th century the practice of ruling Egypt through a governor was resumed under Abdallah ibn Tahir, who decided to reside at Baghdad, sending a deputy to Egypt to govern for him. In 828 another Egyptian revolt broke out, and in 831 the Copts joined with native Muslims against the government. Eventually the power loss of the Abbasids in Baghdad has led for general upon general to take over rule of Egypt, yet being under Abbasid allegiance, the Tulunid dynasty (868–905) and Ikhshidid dynasty (935–969) were among the most successful to defy the Abbasid Caliph. The Fatimids, Ayyubids and Mamluks Muslim rulers remained in control of Egypt for the next six centuries, with Cairo as the seat of the Fatimid Caliphate. With the end of the Ayyubid dynasty, the Mamluks, a Turco-Circassian military caste, took control about 1250. By the late 13th century, Egypt linked the Red Sea, India, Malaya, and East Indies. The mid-14th-century Black Death killed about 40% of the country's population. In the late 10th century, the Shia Ismaili caliphate of the Fatimids made Egypt their centre and Cairo their capital. Egypt flourished and the Fatimids developed an extensive trade network in both the Mediterranean and the Indian Ocean. Their trade and diplomatic ties extended all the way to China and its Song Dynasty, which eventually determined the economic course of Egypt during the High Middle Ages. Many traces of Fatimid architecture exist in Cairo today, the most defining examples include the Al Azhar University and the Al Hakim mosque. The Fatimid palace in Cairo had two parts. It stood in the Khan el-Khalili area on Bin El-Qasryn street. In the early 20th century, Egyptian Islam was a complex and diverse religion. Although Muslims agreed on the faith's basic tenets, the country's various social groups and classes applied Islam differently in their daily lives. The literate theologians of Al-Azhar University generally rejected the version of Islam practiced by illiterate religious preachers and peasants in the countryside. Most upper- and upper-middle-class Muslims believed either that religious expression