Malik Ayaz, the Slave Who Rebuilt Lahore and Lies Almost Forgotten

A thousand years ago a slave from the Caucasus became the first Muslim governor of Lahore and raised the city from ruin. His grave now sits in a small room off one of the Walled City’s busiest bazaars

LAHORE: Shoppers pushing through Rang Mahal on a weekday afternoon rarely look up. Cloth merchants call out prices, handcarts loaded with bales squeeze between motorcycles, and the lanes of Shah Alami and Sooha Bazaar spill their trade into the square. Tucked beside a small mosque, behind a plain doorway, is a modest domed chamber that most of them pass without a glance.

Inside lies Malik Ayaz, who by tradition was Lahore’s first Muslim governor, a man born into slavery who became the most trusted companion of Sultan Mahmud of Ghazni and, in the early 11th century, rebuilt a city that had been left in ashes.

It is the oldest known grave inside the Walled City. It is also a reminder that Lahore was a seat of power for five centuries before the Mughals gave it the monuments for which it is famous.

From the slave market to the sultan’s side

Ayaz is generally believed to have been born around 993 in the Caucasus, in what is now Georgia, and to have reached Ghazni, in present-day Afghanistan, as a slave. Like many Turkic and Caucasian slave soldiers of the era, he rose through the ranks of the Ghaznavid army, and accounts list him at the sieges of Lohkot in 1015 and Kannauj in 1018.

What set him apart was his closeness to Mahmud, the Ghaznavid ruler whose raids into the subcontinent made him one of the most consequential figures in its medieval history. Contemporary chroniclers of the Ghaznavid court, including Bayhaqi, describe Ayaz as a commander and trusted noble. Later Persian writers turned the relationship into legend, and the bond between sultan and servant became one of the most retold stories in Persian and Urdu literature.

Lahore rises from the ashes

Mahmud took Lahore in about 1021, ending the rule of the Hindu Shahi dynasty in the city after a long siege. The fighting left Lahore burned and largely depopulated. Mahmud then handed its government to Ayaz.

Ayaz is credited with repopulating and rebuilding the city in mud brick. Historians believe he raised a thick mud wall around the settlement and built a fort on the high ground beside the Ravi between about 1037 and 1040, on the site where the Lahore Fort now stands. Later chroniclers, including Munshi Sujan Rai Bhandari in his 17th-century Khulasat-ut-Tawarikh, credit him with the city’s early gates.

Little of that Lahore survives above ground. Akbar replaced the earthen ramparts with burnt-brick walls about 500 years later, and successive rulers built over the old foundations. But the outline of the city Ayaz restored, a walled town of bazaars, mohallas and narrow lanes shaped by the slope of the land and the flow of the river, still underlies the Walled City’s street plan.

Under the Ghaznavids, Lahore grew into a provincial capital and a centre of poetry and learning; the poet Masud Saad Salman and the Sufi scholar Ali Hujwiri, revered today as Data Ganj Bakhsh, both lived there in the century that followed. Ayaz died in Lahore, by most accounts in 1041, and was buried just outside what were then the city’s walls.

Sultan Mahmud and Ayaz in Persian painting
A 15th-century miniature illustrating poems by Farid al-Din Attar, which retold stories of Sultan Mahmud and his companion Ayaz; Southern Iran, 1472. (PHOTO: The British Library, London)

Loyalty, envy and a sheepskin coat

Ayaz lives on less in brick than in verse. Persian poets from Farrukhi to Attar, Saadi and Rumi used the pair as a parable of love, loyalty and humility.

The best known of these tales, told by Rumi in his Masnavi, has jealous courtiers convinced that Ayaz is hiding stolen treasure in a locked room he visits each day. When the sultan has it opened, they find only the worn sheepskin coat and rough shoes Ayaz wore as a slave, which he visits to remind himself where he came from. For Rumi, the room was a lesson in humility; for the courtiers, a lesson in envy.

In Lahore the story found its most famous echo in Allama Muhammad Iqbal. In Shikwa, his 1909 poem of complaint to God, he described Muslim prayer as the great leveller of rank:

“Ek hi saf mein khare ho gaye Mahmood o Ayaz,
Na koi banda raha aur na koi banda nawaz.”

Mahmud and Ayaz stood in the same row, the couplet says; no one was any longer servant or master. More than a century later it is still recited in Pakistani classrooms and sermons, often by people who have no idea that one of its two subjects is buried a short walk from Iqbal’s own resting place beside the Badshahi Mosque.

A tomb lost, rebuilt and overlooked

The grave itself has had a turbulent history. Ayaz’s original tomb and garden were destroyed during the Sikh period in the late 18th and early 19th centuries, according to historical accounts. The grave survived as a simple mud mound in what had by then become the Rang Mahal area.

The present domed chamber is a 20th-century structure. Lahore historian Majid Sheikh has written that traders of Shah Alami built the brick room over the grave, which is now part of the Walled City of Lahore Authority’s Royal Trail and listed in its heritage collection on Google Arts & Culture.

Those who know the tomb come mostly as visitors on guided walks, and the authority’s revived History by Night tours have introduced more Lahoris to the old city’s lesser-known sites. Yet compared with the Mughal monuments a kilometre away, the grave of the man who first fortified the city draws little attention.

Rang Mahal and the old city around the Ayaz's tomb
Bazaars around Chowk Rang Mahal, the commercial heart of the Walled City, where Malik Ayaz’s tomb stands beside a small mosque. (PHOTO: Dawn)

Why Ayaz matters now

For Lahore, Ayaz’s story is part of a longer argument about what the city chooses to remember. Its heritage spending and tourism branding still centre on the Mughal era, while older layers, from the Ghaznavid city to the lanes Ayaz laid out, receive far less attention. Conservation projects elsewhere in and around Lahore, from the Rs400 million restoration of Kamran’s Baradari to the recently restored Padhana gurdwara, show what focused investment can do.

The old city also faces everyday threats. Monsoon flooding this year again exposed the Walled City’s fragile drainage, and commercial pressure from wholesale trade continues to eat into historic buildings around Rang Mahal and Shah Alami.

Heritage advocates argue that a proper archaeological survey of the area around the tomb, a clear information plaque in Urdu and English, and inclusion in school curricula could help restore Ayaz’s place in the city’s story.

The man who rose from slavery to rebuild Lahore asked, in Rumi’s telling, only to be reminded of where he had begun. A thousand years on, the city he raised from the ashes could do more to remember where it began too.

Leave a Reply