of the Mamluk sultan al-Nasir Muhammad (1293–1341, including interregnums), Cairo reached its apogee in terms of population and wealth. A commonly-cited estimate of the population towards the end of his reign, although difficult to evaluate, gives a figure of about 500,000, making Cairo the largest city in the world outside China at the time. Despite being a largely military caste, the Mamluks were prolific builders and sponsors of religious and civic buildings. An extensive number of Cairo's historical monuments date from their era, including many of the most impressive. The city also prospered from the control of trade routes between the Indian Ocean and the Mediterranean. After the reign of al-Nasir, however, Egypt and Cairo were struck by repeated epidemics of the plague, starting with the Black Death in the mid-14th century. Cairo's population declined and took centuries to recover, but it remained the major metropolis of the Middle East. Under the Ayyubids and the later Mamluks, the Qasaba avenue became a privileged site for the construction of religious complexes, royal mausoleums, and commercial establishments, usually sponsored by the sultan or members of the ruling class. This is also where the major souqs of Cairo developed, forming its main economic zone of international trade and commercial activity. As the main street became saturated with shops and space for further development there ran out, new commercial structures were built further east, close to al-Azhar Mosque and to the shrine of al-Hussein, where the souq area of Khan al-Khalili, still present today, progressively developed. One important factor in the development of Cairo's urban character was the growing number of waqf establishments, especially during the Mamluk period. Waqfs were charitable trusts under Islamic law which set out the function, operations, and funding sources of the many religious/civic establishments built by the ruling elite. They were typically drawn up to define complex religious or civic buildings which combined various functions (e.g. mosque, madrasa, mausoleum, sebil) and which were often funded with revenues from urban commercial buildings or rural agricultural estates. By the late 15th century Cairo also had high-rise mixed-use buildings (known as a rab''', a khan or a wikala, depending on exact function) where the two lower floors were typically for commercial and storage purposes and the multiple stories above them were rented out to tenants. Cairo as a provincial capital of the Ottoman Empire Egypt was conquered by the Ottoman Empire in