From the medieval period onward, the Khan al-Khalili area was made up of several major khans/wikalas grouped together, with souq streets existing between them. By the end of the Mamluk period in the early 16th century, there were 21 khans/wikalas in the district. From al-Ghuri's reign onward, the district became associated with Turkish merchants, and during the Ottoman period the Turkish community of Cairo was centered there. In particular, the Khan al-Fisqiya (or Wikala al-Qutn), which replaced the original Khan al-Khalili structure, was inhabited by Turkish merchants.During the Ottoman period, the prosperity of Cairo's souqs waxed and waned in accordance with local political and international economic conditions. While Cairo was no longer an imperial capital, it nonetheless played a highly important role in the trade networks of the Ottoman Empire. New khans/wikalas continued to be built. Unlike the previous Mamluk period, the construction of new commercial buildings began to shift to the west of the Qasaba avenue (al-Muizz street) – the only area where there was still space to build. New constructions were relatively rare in the 16th century, but became more common again in the 17th century. Many old buildings were also restored, altered, or rebuilt, especially in the 18th century. While new religious complexes were rarely built (in contrast with the Mamluk period), many small mosques or prayer areas were installed inside existing khans/wikalas. By the end of the 18th century (just before Napoleon's invasion), some 39 khans/wikalas existed in the area of Khan al-Khalili and its adjoining districts. One late example of a large wikala/khan built in the heart of the Khan al-Khalili is the Wikala of Sulayman Agha al-Silahdar (or Wikala al-Silahdar), built in 1837 to replace a ruined Mamluk-era khan and still partially standing today, directly across from the Bab al-Ghuri.