Egypt in the 14th century was a glorious kingdom to behold. Spice merchants from Europe, Asia and Africa sailed up the Nile River to the great port city of Alexandria, carrying riches such as silk, jewels and spices. Cairo, the capital of Egypt, was the greatest city in the Islamic world, with a larger population and more wealth and splendor than any city in Europe. Cairo was a shining pinnacle of cosmopolitan splendor in the medieval world, and besides being a major trading hub, Cairo was famous for its scholars and intellectual class, offering countless academic opportunities for scholars across the Islamic world. The culture of Cairo was dynamic and famous for its wide range of intellectual debates on Islamic sciences and other academic fields, all of which far surpassed any contemporary city at the time. From across the Islamic world, scholars from all the major schools of thought were represented in Cairo. Spirited lectures occurred frequently in public squares and madrasas were often packed with patrons eagerly listening to readings by famed scholars. Cairo was a city filled with art, trade and knowledge.
However, there was another factor that made Cairo infamous. The city represented the last bastion of the Muslim world - a great Islamic caliphate, centered in Iraq, had once stretched from the edges of Central Asia to Spain, but invasions by outside enemies had mostly overrun this once mighty empire. The Mongol armies, pouring forth from their grasslands in Asia, had sacked Baghdad in 1258, destroying the caliphate and sending the Islamic world into a state of deep peril. Moreover, European crusaders had launched multiple invasions into Palestine and the Levant, threatening the very existence of the Muslim world. Ultimately these foreign invaders were all stopped by one group: the Mamluks of Egypt, a group of warriors, slaves, and kings.