Hakim Sanai of Ghazni: The Poet Who Opened the Way for Rumi
- Who was Sanai?
- The story of the conversion
- The Walled Garden of Truth
- Sanai, Attar and Rumi
- Sanai’s tomb in Ghazni
- Reading Sanai before you travel
- Following the poets with Tour.af
By Tour.af

Ask an Afghan reader to name the great poets of the Persian language and you will probably hear Rumi, Jami and Hafez before you hear Sanai. Yet the man known as Hakim Sanai of Ghazni stands near the beginning of a tradition that runs through all of them. Rumi himself acknowledged the debt. For a traveller curious about Afghanistan’s literary past, Sanai is a good place to start, because his life connects the medieval court city of Ghazni with the mystical poetry that later made Balkh-born Rumi famous across the world.
Who was Sanai?
Abu’l-Majd Majdud ibn Adam, who wrote under the pen name Sanai, was born in Ghazni in the second half of the eleventh century. Ghazni was then the capital of the Ghaznavid dynasty, a power that at its height ruled lands from eastern Iran to northern India and drew scholars and poets to its court. His exact dates are uncertain. Most sources place his death in or around 1131, while some scholars argue for a later date.
Sanai began, like many poets of his time, as a court poet. He wrote praise poems, known as qasidas, for patrons and officials. At some point his work turned away from flattery towards ethics, faith and the inner life. He spent years away from Ghazni, in cities of Khorasan such as Balkh, Sarakhs, Merv and Nishapur, before returning home.
The story of the conversion
A well-known story, told by later writers including Jami of Herat, explains the change. Sanai, it is said, was on his way to present a poem to the Ghaznavid sultan when he passed a garden where a half-mad drunkard was mocking the sultan and the poets who praised him. The man’s words shook Sanai so deeply that he abandoned the court and set out on a spiritual path.
Historians treat this tale as a legend rather than biography. It is still worth knowing, because Afghans and Iranians often tell it, and it captures how later readers understood Sanai: as a poet who turned from worldly ambition to the search for truth.
The Walled Garden of Truth
Sanai’s most famous work is the Hadiqat al-Haqiqa, usually translated as The Walled Garden of Truth. It is a long poem in rhyming couplets, the form called masnavi, dedicated to the Ghaznavid ruler Bahram Shah. In it Sanai mixes teaching, prayer, anecdotes and short parables about God, the soul, knowledge, love and right conduct.
What made the work important was its form as much as its content. Sanai is widely regarded as one of the first poets to use the masnavi for Sufi teaching on a large scale. He also gave the ghazal, the short love lyric, a mystical meaning, so that the beloved could be read as the divine. Both choices shaped what came after.
Sanai left other works too, including a large Divan of qasidas and ghazals and a shorter allegorical poem about the soul’s journey, Sayr al-‘Ibad ila’l-Ma’ad.
Sanai, Attar and Rumi
The best-known tribute to Sanai comes from Rumi. A line often attributed to him says that Attar was the spirit and Sanai its two eyes, and that he himself came after both. Rumi’s great Masnavi uses the same couplet form Sanai had used for teaching, and it quotes and answers Sanai in several places.
This matters for anyone travelling in Afghanistan. Rumi was born in Balkh in the north of the country, Sanai in Ghazni to the south of Kabul, and Jami, who retold Sanai’s story, lived and died in Herat. Together they map out a literary geography that you can still sense in the old cities today.
Sanai’s tomb in Ghazni
Sanai is buried in Ghazni, where his tomb has been a place of visitation for centuries. Ghazni lies on the main road south-west of Kabul and is also known for its medieval minarets and the remains of its Ghaznavid past. The tomb is a shrine, so the usual courtesies apply: dress modestly, remove shoes where asked, keep your voice low and ask before photographing people.
Reading Sanai before you travel
You do not need to read Persian to get a feel for Sanai. Several English translations and selections of the Hadiqa exist, and anthologies of Persian Sufi poetry usually include him. A few short parables read on the plane will give you something to talk about with Afghan hosts, many of whom know lines of classical poetry by heart. Our short guide to customs in Afghanistan explains other everyday courtesies worth knowing.
Following the poets with Tour.af
Tour.af is a licensed tour operator based in Kabul. A private Kabul week from $1,599 runs on your own dates with a licensed guide, and can include bookshops, historic sites and conversations about Afghan poetry. The Silk Road Highlights tour, 10 days from $2,499, reaches the northern and western cities linked with Rumi and Jami. The letter of invitation and permits come with the quote. Browse all Afghanistan tours or start at tour.af.
Tour.af, Ahmad Shah Baba Mena, Kabul 1012, Afghanistan. +93 70 521 4101. WhatsApp · tour.af
Written with AI assistance and reviewed by Tour.af.
- Reference: https://tour.af
Write a comment