Sultanahmet Külliyesi is a multi-function complex in Istanbul that Ottoman sultan Ahmed I (r. 1603-1617/1012-1026 AH) commissioned during his brief reign. Work on the complex began in August 1609/1018 AH and finished in 1617/1026 AH just before the sultan's death. Work on the other buildings in the complex continued for three years under his sons Mustafa I (1617-1618/1026-1027 AH) and Osman II (1618-1622/1027-1031 AH), who also built a mausoleum for their father. The complex is composed of a mosque, royal pavilion (hünkar kasrı), mausoleum (türbe), madrasa (medrese), school for koran readers (dar'ül kurra), Koranic school for boys (mekteb), hospice (tabhane), hospital (darüssifa), soup kitchen (imaret), an open air market street (arasta), rental rooms (kira odalari) and mansions (konak), cisterns (mahzen) and public fountains (sebil).
The complex is sited in the heart of the old city of Istanbul, close to the Hagia Sophia. The southern part of the ancient Hippodrome or Atmaydanı (today's Sultanahmet Square) was cleared of residential palaces belonging to members of the aristocracy and a large portion of the Byzantine sphendone (the semi-circular end of the hippodrome) was taken down to make space for the mosque. For a variety of reasons including the terrain of the site, master architect Sedefkar Mehmet Aga organized the complex's buildings in functional groups in the vicinity of the mosque rather than arrange them symmetrically around the mosque as was done in its precedents at Fatih and Süleymaniye. The complex buildings conform to the orientation of the mosque, 39 degrees east of south.
The walled mosque precinct, enclosing the mosque and the royal pavilion, occupies the peak of a hill alongside the Atmeydani to the northwest. Terraces descend down to the Bosphorus on the southeast side of the precinct wall. In 1912, a fire leveled the Ishakpasa (today's Küçükayasofya) neighborhood down the hill from the mosque, allowing archaeologists to reveal the remains of the Great Palace of Emperors (Büyük Saray) that was inhabited between the 4th and the 12th centuries CE. The mosque and market streets that run along its precinct wall to the southeast were built over the undercrofts of this palace. Further excavations in the market street and vicinity in 1935-1938, 1951-1954 and from 1983 to our day have unearthed 6th century palace floor mosaics that are on display at the Great Palace Mosaic Museum that occupies part of the rebuilt market street. Nothing remains of the rental rooms that were located above the stores here and others that were distributed among the buildings of the complex. The hammam of the market street, located at its southwest end, remains in disrepair.
On the north corner of the precinct, the madrasa (school for Koran readers) and the mausoleum form an enclosed cluster. These buildings were built on the cisterns of the 4th century Byzantine Sphendone, which was already in disuse by the early 13th century. The soup kitchen, hospital, and hospice form a second cluster that was built on top of the sphendone after the Hippodrome was filled with earth from the mosque's excavation. Only sections of the soup kitchen remain at this location today where an industrial school complex (mekteb-i sanayi) was built in the 19th century.