Mahmut I who reigned between 1730- 1754, gave strong interest in Hagia Sophia. He ordered repairs, and also he added a library, a fountain, an imaret ( a kitchen to serve food for poor) and a school for children to Hagia Sophia.
The library is located on the first floor of Hagia Sophia at the southern aisle. It is a rectangular room, half of the walls decorated with marble and half top with iznik tiles. On the east wall hangs the “tugra” (calligraphic signature) of Mahmut I.
The library’s front side has six columns, and in between there are bronze grills that closes the interior.