This is the era in which Punjab acquires the two things it is still recognisably made of: a devotional tradition in its own language, and a religion founded inside it.

A capital, and the saints who followed the armies

In 1021 Mahmud of Ghazni took Lahore, and for the first time in a very long while the city was governed from inside rather than passed through. Under the Ghaznavids it became a provincial capital, and it has been a capital of something almost ever since — of Mughal Punjab, of the Sikh Empire, of Pakistani Punjab today.

The armies came down the northwest roads, and so did the Sufis. Ali Hujwiri, remembered as Data Ganj Bakhsh, died in Lahore around 1072 and is buried there; his shrine is still one of the busiest in South Asia. A century later, at Pakpattan on the Sutlej, Baba Farid did something with much longer consequences: he composed in Punjabi. He is the first Punjabi poet whose work survives, and — a detail that matters enormously for what comes next — his verses were later included in the Sikh scripture, which is why a twelfth-century Muslim mystic is read every day in gurdwaras.

The Sufi line runs right through the era. Shah Hussain in sixteenth-century Lahore, Mian Mir whose friendship with the Sikh Gurus is one of the most quoted facts in Punjabi history, Sultan Bahu and his hu in the seventeenth. Punjab's four great love stories — Heer Ranjha, Sassi Punnun, Sohni Mahiwal, Mirza Sahiban — are set in this world, though the poems that fixed them in their final form were mostly written later, and sit with their poets in the next era.

Nanak

In 1469 a boy was born at Talwandi, now Nankana Sahib, to a village accountant. What Guru Nanak did with the next seventy years — the travelling, the arguing, the refusal of ritual, the insistence that there is no Hindu and no Muslim — is the hinge of this whole library. Two people were with him for most of it: his elder sister Bibi Nanaki, who recognised what he was before anyone else, and Bhai Mardana, a Muslim musician who played the rabab beside him for decades. He spent his last years farming at Kartarpur on the Ravi.

Then nine more, over the better part of two centuries, each of whom added something the last one had not:

  • Guru Angad Dev (1539) gave Punjabi the Gurmukhi script it is written in.
  • Guru Amar Das (1552) built the institutions — langar as a rule rather than a gesture, a network of preaching seats, an argument against sati and purdah.
  • Guru Ram Das (1574) founded the city that became Amritsar.
  • Guru Arjan (1581) built the Golden Temple, compiled the Adi Granth in 1604 — including Farid, including Kabir, including Hindu and Muslim voices — and in 1606 was executed in Lahore, the first Sikh martyr.
  • Guru Hargobind (1606) answered that by putting on two swords and raising the Akal Takht opposite the temple: temporal authority beside spiritual, miri and piri.
  • Guru Har Rai (1644) kept a standing force and never used it, and is remembered for medicine and for restraint.
  • Guru Har Krishan (1661) became Guru at five and died of smallpox at eight, nursing the sick in Delhi.
  • Guru Tegh Bahadur (1665) was executed in Delhi in 1675 for defending the religious freedom of Kashmiri Hindus — a martyrdom for somebody else's faith, which is the thing about it people most often miss.

What comes next

Tegh Bahadur's execution is why the next era starts the way it does. His son inherited a community that had been told, twice in seventy years, exactly what the state would do to it. In 1699 at Anandpur he did something about it, and Khalsa & Empire begins.