This is the densest era on the site — thirty-one articles — and it has the clearest shape of any of them: a founding, a catastrophe, a recovery, a state, and a collapse.
1699, and the seven years that followed
At Anandpur Sahib in 1699, Guru Gobind Singh founded the Khalsa: an initiated order with a shared name, a visible uniform and no priesthood between a person and the scripture. The Nihangs are its oldest surviving military expression, and the five takhts are where its authority still formally sits.
Within six years it nearly ended. Anandpur was besieged and evacuated. At Chamkaur in December 1704 forty Sikhs held a mud house against an army, and the Guru's two elder sons died there. His two younger sons and his mother, Mata Gujri, were taken to Sirhind, where the boys were executed — the story told as the Sahibzade, and the single most emotionally loaded episode in Sikh memory. At Muktsar in 1705, Mai Bhago led back forty men who had deserted, and they died holding off the pursuit. Through all of it there is Bhai Ghanaiya, who gave water to the enemy wounded and, when reported for it, was told to carry ointment as well.
Banda, and then forty years of being hunted
Guru Gobind Singh died at Nanded in 1708 having ended the line of human Gurus. Banda Singh Bahadur came north with his authority, smashed the Sirhind army at Chappar Chiri in 1710, struck coins, abolished the zamindari system in the territory he held, and was captured and executed in 1716.
What followed was the worst of it. Under successive Mughal governors the Khalsa was declared outlaw and priced by the head, and it went into the forests and the hills. Two mass killings define the period: the Chhota Ghallughara in 1746 in the Kahnuwan marshes, and the Vadda Ghallughara on 5 February 1762, when Ahmad Shah Abdali caught the whole moving community — fighters, families and baggage — in the open. Baba Deep Singh, scholar and soldier, died in 1757 retaking Amritsar.
They survived it by organising into misls: a dozen roughly independent bands who fought separately and decided together, and who between 1748 and the 1780s took over most of Punjab. Jassa Singh Ahluwalia is the figure the era is usually hung on. Patiala and Bahawalpur both became states in these decades and both outlived the empire that came next, by taking British protection instead of fighting it.
Meanwhile the poetry got better. Waris Shah wrote his Heer in 1766 and settled the shape of the Punjabi qissa for good; Bulleh Shah, a Kasur Sufi living through the same wars, wrote the verse that is still sung at every Punjabi wedding and every protest.
Lahore
In 1799 a nineteen-year-old misl chief from Gujranwala took Lahore, with decisive backing from his mother-in-law Sada Kaur, who commanded her own cavalry and has been written out of most tellings. Ranjit Singh spent forty years assembling a state that ran from the Sutlej to the Khyber: a Sikh sovereign with a Muslim-majority population, a Hindu finance minister and European officers drilling his infantry.
Two men carry the military side of it here. Hari Singh Nalwa held the northwest frontier and died at Jamrud in 1837; Akali Phula Singh, the Nihang commander, is the one who summoned the Maharaja to the Akal Takht for a public flogging and got away with it — the sharpest illustration anywhere of what the takhts meant.
Ten years to lose it
Ranjit Singh died in 1839. What followed was a succession bloodbath, an army that had become its own political actor, and Jind Kaur as regent for a child Maharaja, fighting a losing position with real skill.
The Anglo-Sikh Wars took four years and six major battles. Ferozeshah in December 1845 came close to being a British disaster; Aliwal in January 1846 was the clean British win; Sobraon in February 1846 broke the army against its own bridgehead. The second war brought Chillianwala in January 1849 — bloody enough that London argued about it for years — and Gujrat in February, which ended it.
Punjab was annexed on 29 March 1849. Everything after that is Colonial Punjab.