The roots of the Punjabi Revolution come in the unification of Punjab itself by Ranjit Singh, coronated as its Maharaja in 1801. The core was unified through his pure military conquest of the old Sikh theocratic republics, and he quickly pushed its borders further. He pushed into Peshawar and the Khyber Pass, he forced the king of Patiala to submit to his authority, he took over Sindh, and his Jammu Rajput allies took over Kashmir and Ladakh on his behalf. It was a path to power which necessitated a powerful military, and as the British successfully conquered North India in the early 1800s and the Afghans smarted over the loss of Peshawar, this required it to be maintained. As the power and might of the British Empire became more and more apparent, Punjab was forced to modernize its military, and it employed French veteran officers to this end. It established the Fauj-i-Khas, an elite modernized corps with French officers and French language commands, as well as another brigade staffed by British deserters. As the Punjabi Empire proceeded over the next few decades, modernization continued. More and more of the military was modernized, while Punjabis were sent to France to be educated. Managing the Empire proved to be a very complicated affair, and it was effectively prevented from expanding at this point.
But cracks became more and more apparent. The military became increasingly political, an order in and of itself. The decentralization of the subsidiary hill states, Patiala, and Bahawalpur made common policy difficult to implement. And young Punjabis, educated in the west, brought with them new ideals of republicanism that threatened to destabilize Punjabi society. In the 1850s one certain young prince, Dalip Singh, organized a coterie of Punjabi liberals around him, and though this coterie did little more than issue petitions for reform, it brought consternation among the authorities. Following the rise of Jawahar Singh to the throne in 1864, this consternation forced them into internal exile to Jammu in 1871. But then came the Great Indian Famine of 1876-78. Though its effects were nowhere near as horrific as they were in the British Raj, they were bad, and though Punjab did suspend all exports quickly, the decentralized and feudal form of the state resulted in sluggish and intemperate relief. Dalip Singh promoted panaceas - industrial development, free trade, and the creation of a parliament. Many listened. In 1879, Punjab repulsed a massive Afghan invasion with great difficulty. In 1881, an ambitious young general, Prem Nath Kaul, presented evidence of a coup involving most leading generals. This made him the commander-in-chief of Punjab, and he quickly posted troops across Lahore in the name of crowd control. He established a correspondence with Dalip Singh in the name of reforming the state, and in 1882, this plan went into action. He marched with hundreds of his most loyal soldiers into the royal palace, removing Maharaja Jawahar Singh from power, stripping him of the royal turban with his bare hands, and pushing him into perpetual exile in the Raj. In his place, Dalip Singh was coronated with the reformist title of "Maharaja of the Punjabis", and convened a Constituent Assembly. The Punjabi Revolution had begin
Dalip Singh quickly came into conflict with the Constituent Assembly. He wanted more power than the Assembly was willing to give. At the same time, he sought to dispose of General Prem Nath Kaul, who he viewed as a danger to his power, and inevitably this led Prem Nath Kaul to correspond with leading figures of the Assembly. In 1883, Dalip Singh personally visited the Constituent Assembly and all but dictated the constitution it could write. This was the last straw, and with that Prem Nath Kaul flew the flag of revolution once more. Again, he marched into Lahore Palace, removed Dalip Singh's turban, and with it his power, and forced him into perpetual exile in Europe. The Constituent Assembly was now free to write any constitution it wanted, and the 1883 constitution established republic with a system of assembly government with - most strangely - the constitution itself crowned as Maharaja of Punjab in a move intended to evoke the Guru Granth Sahib's position as the guru of the Sikh religion. Many were horrified at this end of Punjabi monarchical government with all its revolutionary, and the British plenipotentiary to Lahore tried to convince Prem Nath Kaul to crown himself Maharaja - Kaul angrily refused, condemning monarchy as tyrannical and against the will of God. To others, however, it was electrifying, a moment of modernity, strength, and resistance to colonialism. Across the Raj, in the Malay world, and beyond, republicans and democrats purchased pictures of Prem Nath Kaul to hang in their houses. The "Punjabi example" was rapidly cited by would-be revolutionaries across Asia. But the declaration of a republic led to subsidiary leaders attempting to break away. In Patiala, the local ruler crowned himself "Maharaja of Punjab" in his own right and made moves to attract British support, the Nawab of Bahawalpur issued a request for British protection, and the Pahari region of Punjab continued to recognize Dalip Singh as legitimate. Prem Nath Kaul, now commander-in-chief of the republic, immediately set foot to Patiala.
In Patiala, British troops (in practice most of them were so-called "Mahrattas") quickly entered on invitation, in violation of the terms of the Treaty of Agra (1868). Prem Nath Kaul's vast army rapidly smashed through the British lines and arrested the king of Patiala. Although a cousin was made Prefect of Patiala, this marked the end of Patiala as a state. Marching to Bahawalpur, Prem Nath Kaul did the same there, although it proved a more difficult process to assert Punjabi authority over this larger state. This forced Britain to terms, and by the Treaty of Delhi (1885), it was forced to respect Punjabi territorial integrity. An Afghan force which attempted to march across the Khyber Pass to conquer Peshawar was halted at the massive Battle of Peshawar, and this forced Afghanistan to likewise respect Punjabi territorial integrity by the Treaty of Kandahar (1887). However, the Pahari rebellion proved tougher. This consisted of dozens of small states in very mountainous terrain, all stubbornly refusing to accept Punjabu republican authority, all the while receiving secret aid from the British Raj and its princely states. Prem Nath Kaul found it tough to conquer them all. First marching to Jammu where the rebellion was headquartered, his army had the town placed under siege; in one of his most infamous acts, his army then broke his siege, in an event than caused brutal street warfare that almost entirely destroyed the town; the modern city of Jammu consists mostly of fin-de-siecle neoclassical architecture as a result. But this successful conquest failed to break the rebellion as a whole. Another famous event occurred in 1888 at Kangra, where Prem Nath Kaul was able to attain a surrender through threats, and his army famously intervened to stop an anti-Muslim pogrom. This was all hard-fought, but by 1890 for the most part the Pahari region was brought under Punjabi control. However, many parts remained free from it up until the great railway projects of the 1890s.
Returning to Lahore a hero, Prem Nath Kaul was disturbed at the disarray and instability of the assembly. He believed it nothing more than civilian instability, and he was convinced that if he and his military came in and governed Punjab temporarily, it could put the nation on a path of liberty and order. And so, in 1890, he issued a proclamation declaring he would take control of the government, to thundering crowds. His officers took control of the assembly and forced it to make him the new
Sadr-i-Sarkar (head of government). With that, the Punjabi Revolution came to an end. With a strong hand, Sardar Prem Nath Kaul ruled the nation, building new railways and schools. He codified Punjabi in a variant of the Perso-Arabic script made especially for printing, with full representation of vowels; this script influenced reform projects in Turkey and the Malay world. He pushed Punjabi onto the speakers of "irregular dialects" in the Pahari region, even while pushing a recognized status of Sindhi, Kashmiri, and Persian into law. He secured secularism and, despite being an extremely devout Hindu, he secured the acceptance of the Sikh, Muslim, and Hindu clergy of this new status quo and forced those who didn't out of power and, in some cases, out of the nation. He granted recognition to three parties - the ruling Jamhuriyat Sabha, the rightist Insaaf Sabha, and the leftist Kamchari Ate Kisan Sabha - while banning all others, and forcing all legislators and functionaries an oath of loyalty to the republic and hatred to monarchy and feudalism. Prem Nath Kaul died in 1903, both respected for his reforms and loathed for his authoritarianism. He caused one last controversy when the British Raj dragged his feet over his ashes being placed into the Ganges, all out of fear of this being an example to would-be revolutionaries; it ultimately accepted a toned-down ceremony in 1907, but this did not stop a crowd from gathering and chanting "Prem Nath Kaul Zindabad" in opposition to the Raj.
Punjab was forever remade; whether this was for better or for worse, only time can tell.