Khiva · Sights
Shirgazi Khan Madrasah, Khiva
The Shirgazi Khan madrasah in Khiva, built in the 1720s by Persian captives, the dramatic legend of its founder’s death, the poet Makhtumkuli and how to visit.
The Shirgazi Khan madrasah (1718–1726) stands opposite the Pahlavan Mahmud mausoleum in the south of Ichan-Kala. It was built by Shirgazi Khan, reportedly using Persian captives taken in a raid on Mashhad. A famous legend tells that the slaves killed the khan when he broke his promise to free them. It is one of Khiva’s oldest madrasahs. Allow 15–20 minutes.
The khan and his captives
Shirgazi Khan ruled Khiva in the early 18th century. In 1717 a Russian expedition under Prince Alexander Bekovich-Cherkassky marched to Khiva; the khan’s forces destroyed it by a trick, inviting the Russian troops to divide into small groups and then attacking them. The episode became famous as one of Russia’s great military disasters in Central Asia.
The khan then launched raids into Persia, and in one of them, on the region of Mashhad, his troops took several thousand captives. According to tradition, he used them to build a new madrasah in Khiva, promising them freedom when it was finished. As the work dragged on, the story goes, the khan grew impatient and kept postponing their release. When the building was nearly complete, the captives, despairing of ever being freed, attacked the khan in the unfinished madrasah and killed him, in 1728.
Historians treat the legend with caution, but it is often told to visitors and gives a vivid picture of the slave trade that sustained Khiva until 1873.
The building
The madrasah is a two-storey building around a courtyard, with student cells on both floors. Its facade faces the square in front of the Pahlavan Mahmud mausoleum. The portal is decorated with blue and white glazed tiles and inscriptions, more restrained than the brilliant majolica of the 19th century. Its entrance leads into a domed vestibule and then the courtyard.
It was one of the largest and most respected schools of Khiva in the 18th century and was known by the name Maskani Fazilon, “dwelling of the learned”. Students came from all over Khorezm and beyond.
Makhtumkuli
The madrasah’s most famous student was Makhtumkuli Pyragy (Magtymguly), the great 18th-century Turkmen poet and philosopher, who is said to have studied here for a time. His poems, which call for unity among the Turkmen tribes, are at the heart of Turkmen national identity today. A plaque recalls his stay. For visitors who continue to Turkmenistan, it is a reminder that Khiva lay at a crossroads of Uzbek, Turkmen, Karakalpak and Persian cultures.
What you see today
The courtyard and some rooms are open to visitors. Exhibitions inside have changed over the years; some cells may hold displays, craft workshops or souvenir shops. The building itself, with its worn tiles and quiet courtyard, is the main attraction. It is less restored than many monuments in Khiva, which gives it a more authentic feel.
Standing in the courtyard, it is worth remembering that for more than a century after it was built, Khiva’s markets traded in people. Persian, Russian and other captives were sold at the eastern gate, worked in the fields of the oasis and built many of the city’s monuments. The Russian demand to end the slave trade was one of the reasons for the conquest of 1873, after which thousands of captives were freed.
Visiting
Location: in the south of Ichan-Kala, facing the Pahlavan Mahmud mausoleum, near the Islam Khoja minaret.
Tickets: usually included in the Ichan-Kala combined ticket.
Time needed: 15–20 minutes.
Tips: combine with the Pahlavan Mahmud mausoleum, the Islam Khoja minaret and the Sayid Alauddin mausoleum in one walk through the southern part of the old city. Ask a guide to tell the story of the Bekovich expedition and the captives: it makes the building come alive. See our Khiva itinerary.
Frequently asked questions
Who built the Shirgazi Khan madrasah?
Shirgazi Khan, ruler of Khiva, between 1718 and 1726, reportedly using Persian captives taken in a raid on Mashhad.
How did Shirgazi Khan die?
According to legend, the captives who built the madrasah killed him in 1728 when he failed to keep his promise to free them.
Which famous poet studied at the madrasah?
The 18th-century Turkmen poet Makhtumkuli is said to have studied there.
Rules, timetables and prices change. We check this page regularly, but always confirm entry requirements with official sources before you travel.





