Topkapi Palace has four courtyards. The second gate leads into the Divan Courtyard (Divan Meydani), second courtyard of the palace. The Divan Courtyard is a semi-public space. This is where all the affairs of the empire were carried out and citizens could enter this area to give their petitions. Buildings in this courtyard serve administrative and general purposes.