Shirgazi-khan madrassah is the oldest in Khiva. It is located to the south from Pahlavan-Mahmud Mousleum. It was constructed in 1718-1720 after successful military campaign of Shirgazi-khan (1715-1728) to Khurasan. Since madrassah is located in the break of ancient city wall, its floor is two meters lower than the floor of Pahlavan-Mahmud Mausoleum. Dome building of Shirgazi-khan mausoleum adjoins the madrassah on the west. The madrassah is famous for the outstanding poet Mahtumkuli who studied there in the middle of 18th century. His poetic lines "gold book was opened to me here. Forgive me, I am leaving, dear Shirgazi" were devoted to the madrassah.