The History of Nepal: Unification to Republic
From Prithvi Narayan Shah's 1768 conquest through a hereditary regime, a decade of civil war and a palace massacre, to the 2008 republic.
NepGem team · Local guides and trip planners
· 17 min read

Modern Nepal was assembled, not inherited: a single hill kingdom conquered and absorbed dozens of independent principalities and city-states between the 1740s and early 1800s, then spent the following two centuries working out who would actually run the country it had created. That question was answered four times over, each time by force rather than by ballot until the last: by a hereditary prime ministership that ruled for a century while the king became a figurehead, by a king who took direct power back, by a Maoist insurgency that killed an estimated 17,000 people, and finally by a 2008 vote that abolished the monarchy altogether. Understanding present-day Nepal, including why Kathmandu, Patan and Bhaktapur each still have their own Durbar Square, starts with the century before unification, not after it.
Before unification: the Malla city-states
The Kathmandu Valley was not a single city before Nepal existed as a unified state; it was three rival kingdoms sharing one valley, each centred on its own royal square. Kathmandu, Patan (Lalitpur) and Bhaktapur had all been ruled by branches of the Malla dynasty, which governed the valley in various forms from around the twelfth century until unification, and by the seventeenth and eighteenth centuries the three cities had split into fully independent, frequently competing kingdoms, each with its own king, court, army and ambitions toward the other two.
That rivalry is precisely why each city has its own Durbar Square, the plaza-and-palace complex built to project a monarch's power and religious legitimacy to his own subjects. The Malla kings competed as patrons of temple-building and Newar craftsmanship as much as they competed militarily, commissioning the pagoda temples, carved wooden windows and stone courtyards that still define each square today; a visitor who compares Kathmandu's Durbar Square with Patan's or Bhaktapur's is, without necessarily realising it, comparing three separate royal building programmes each trying to outdo the other two. The UNESCO-listed monument zones that protect all three squares today exist because this three-way architectural rivalry left behind an unusually dense concentration of Newar palace and temple architecture in a single valley.
The Mallas' fatal weakness was the same rivalry that produced their architecture: three competing valley kingdoms, plus a scatter of smaller principalities across the surrounding hills, were never going to hold against a single determined outside power once one appeared. That power arrived from a small hill kingdom to the west, one the Mallas had mostly ignored.
Beyond the valley itself, the region the Mallas ruled sat at the centre of a wider political map made up of dozens of small hill principalities, collectively remembered in Nepali historiography as the Baise and Chaubise rajya (the "twenty-two" and "twenty-four" kingdoms), scattered across the mid-hills to the west and east of the valley. Gorkha was only one of these small states, and not obviously the strongest of them when Prithvi Narayan Shah took its throne; its eventual dominance over the others, and then over the valley itself, was a specific political and military achievement rather than a foregone outcome of size or geography.
Prithvi Narayan Shah and the Gorkha conquest, 1768
Prithvi Narayan Shah became king of the small hill principality of Gorkha in 1743 with an explicit, stated ambition to bring the Kathmandu Valley's wealth and trade routes under his control, and he pursued that goal with a patience that outlasted several failed early attempts. His forces first tried to take the valley by direct assault and were repelled; he responded by shifting to a strategy of blockading the valley's trade routes over more than a decade, slowly strangling the Malla kingdoms' access to the Indian plains trade that their economies depended on, while picking off smaller principalities around the valley's edges to close off any escape route for reinforcements or supplies.
The blockade strategy worked where direct assault had failed. Gorkha forces took Kathmandu itself in September 1768, reportedly during the Malla king's own Indra Jatra festival celebrations, followed by Patan later the same year and Bhaktapur in 1769, ending independent Malla rule in the valley. Prithvi Narayan Shah then moved his capital from Gorkha into the conquered valley, a decision that made Kathmandu the seat of Nepali power for the first time and set the pattern for every government since. His campaigns did not stop at the valley: continued conquest under his successors pushed Nepal's borders west toward the Sutlej River and east into Sikkim before British intervention in the 1814–1816 Anglo-Nepalese War fixed the country's borders roughly where they sit today, a war and its aftermath covered in full in the Gurkha history that grew out of it.
Prithvi Narayan Shah is officially commemorated in Nepal as the unifier of the nation, and his campaigns are the reason the country exists in its current form at all; he is also, honestly, a more contested figure than that official framing suggests, remembered by some of the smaller kingdoms and ethnic groups his campaigns absorbed as a conqueror rather than solely as a founder. Both readings describe the same events.
His own writings, later compiled and remembered as the Dibya Upadesh (Divine Counsel), a set of political and administrative instructions he reportedly gave near the end of his life, describe Nepal as a garden of four castes and thirty-six sub-castes that needed careful, deliberate management rather than a single homogeneous nation, an early acknowledgement of the ethnic and linguistic diversity his conquests had brought under one crown. That diversity, and the tension between central control and regional identity it created, runs through Nepali politics from 1768 onward and resurfaces explicitly in the federal boundary disputes discussed later in this article.
The Rana century, 1846–1951
Nepal's monarchy survived unification, but for a full century after 1846 it did not actually govern the country. The turning point was the Kot Massacre of September 1846, in which the ambitious army commander Jung Bahadur Rana orchestrated the killing of several hundred rival courtiers, military officers and nobles inside the Kot courtyard in Kathmandu during a single night, eliminating essentially every rival power centre in one move. Jung Bahadur then installed himself as prime minister and, crucially, made the office hereditary within his own Rana family line rather than an appointment the king could revoke, reducing the Shah kings to ceremonial figures confined largely to their palace while Rana prime ministers ran the country for the following 104 years.
The Ranas ran an openly extractive, closed state. Government revenue and land grants concentrated heavily in Rana family hands, ordinary Nepalis had essentially no political voice, and the family deliberately kept Nepal isolated from outside contact, restricting almost all entry by foreigners and limiting Nepalis' own opportunities to travel, study or trade abroad. This is the direct reason Nepal was a closed country to virtually all outside visitors until 1951: the isolation was not incidental to Rana rule, it was one of its foundations, since a closed country was easier for one family to control indefinitely. It is also why the first British and other foreign attempts to approach Everest and Nepal's other high peaks in the first half of the twentieth century had to go through Tibet instead, since Nepal's own access was sealed; the fuller story of that closed border and how it finally opened picks up directly from where this section leaves off.
Successive Rana prime ministers did make some concessions over the century, mostly where they served the family's own interests: Chandra Shumsher, prime minister from 1901 to 1929, formally abolished slavery in Nepal in 1924 and permitted limited modern schooling, while still keeping political organisation and the press tightly banned. These reforms softened the regime's image without touching its core structure, in which the prime ministership passed within the Rana family by a fixed order of succession and the king remained confined largely to ceremonial and religious duties inside his own palace.
The Rana regime ended much as it began: through a sudden concentration of pressure rather than gradual reform. By the late 1940s, a coalition of Nepali reform movements based partly in exile in India, encouraged by India's own recent independence and backed at a critical moment by King Tribhuvan, who took refuge in the Indian embassy in Kathmandu in 1950 rather than remain a Rana figurehead, forced a negotiated end to hereditary Rana rule in 1951. The king was restored to genuine authority for the first time in over a century, and Nepal's borders opened to the outside world in the same period.
1951–1990: panchayat and the democracy movements
The 1951 settlement promised constitutional, multi-party government, and Nepal did hold its first general election in 1959. It did not last: in 1960, King Mahendra dissolved the elected government, banned political parties outright, and replaced multi-party democracy with the panchayat system, a tiered structure of councils that concentrated real power back in the palace while presenting an appearance of local representation. The panchayat system ran for three decades under Mahendra and then his son Birendra, with political parties operating illegally or from exile for almost the entire period.
Pressure against the panchayat system built steadily rather than erupting suddenly, through underground party organising, periodic protests, and growing public frustration with a system that offered no genuine channel for opposition. It reached a head in the 1990 Jana Andolan (People's Movement), a sustained nationwide protest movement that combined banned political parties with broad public participation and, after weeks of demonstrations and state repression that included fatal police action against protesters, forced King Birendra to accept multi-party democracy and a new constitution establishing Nepal as a constitutional monarchy with an elected parliament. It was the first time since 1846 that ordinary Nepalis had a genuine, sustained say in how the country was run, and it set the stage, imperfectly, for the conflict that followed within six years.
The 1990 constitution's central weakness, in hindsight, was reach rather than design: the new multi-party parliament sat in Kathmandu, but successive elected governments through the 1990s struggled to extend basic services, land reform and development spending into the mid-western hill districts that had gained the least from either panchayat-era development or the new democracy, districts including Rolpa and Rukum that became the Maoist insurgency's original organisational heartland within only a few years of the 1990 settlement.
The Maoist civil war, 1996–2006
Nepal's ten-year civil war began in February 1996, when the Communist Party of Nepal (Maoist) launched an armed insurgency against the state, citing entrenched rural poverty, caste and ethnic discrimination, and the new democratic system's failure to reach far beyond Kathmandu as its justifications. The insurgency spread from a handful of mid-western hill districts to most of the country over the following years, with Maoist forces establishing parallel local governance structures in areas they controlled while fighting government security forces in a conflict that escalated sharply after a 2001 state of emergency and the deployment of the Royal Nepalese Army against the insurgency, which had previously been handled mainly by police.
The human cost was severe and is documented by both Nepali and international human rights organisations: widely cited estimates put total deaths from the conflict at approximately 17,000, drawn from combatants and civilians on both sides, alongside thousands of documented cases of disappearance, displacement and reported abuses attributed to both government forces and Maoist insurgents. Neither side's record in the conflict is clean, and balanced accounts of the war generally decline to present either side as having fought it without documented abuses.
The war ended through negotiation rather than military victory for either side. A Comprehensive Peace Agreement was signed in November 2006 between the government and the Maoists, following mass pro-democracy protests earlier that year (a second Jana Andolan) that had already forced King Gyanendra to relinquish direct executive powers he had seized in 2005. Under the agreement, Maoist combatants were confined to UN-monitored cantonments and their weapons registered under a joint monitoring arrangement, a process that took years to complete fully and left some ex-combatants dissatisfied with the eventual integration and rehabilitation packages on offer. The agreement nonetheless brought Maoist forces into a peace process that led, within two years, to the monarchy's abolition, an outcome few observers on any side of the conflict had predicted when the war began in 1996.
1 June 2001: the palace massacre
On the night of 1 June 2001, ten members of Nepal's royal family, including King Birendra and Queen Aishwarya, were shot dead inside Narayanhiti Palace in Kathmandu. The Nepali government's official investigation concluded that Crown Prince Dipendra carried out the killings before shooting himself, reportedly during a family dispute connected to his choice of a marriage partner that the royal family had opposed; Dipendra was placed on the throne while comatose and died three days later, after which the king's brother Gyanendra became king.
That official account has never been universally accepted inside or outside Nepal. Some Nepalis and outside commentators have raised alternative theories, including suggestions of a wider conspiracy involving Gyanendra's branch of the family, pointing to inconsistencies in witness accounts and Gyanendra's own absence from the palace that night; no credible alternative account has produced conclusive evidence to override the official investigation's conclusion, and it remains the closest thing to a settled record of events, but the massacre is still, honestly, remembered in Nepal as an episode where the official explanation and public trust in it never fully aligned. The palace itself compounded the difficulty by cremating the bodies within a day, under Hindu funeral custom, before a fuller forensic investigation could be completed, a decision defended at the time as respecting religious practice and criticised since as having foreclosed lines of inquiry that might otherwise have settled the remaining doubts. Whatever its exact cause, the massacre installed a king in Gyanendra whose subsequent seizure of direct executive power in 2005 helped trigger the second Jana Andolan and, within it, the final push toward abolishing the monarchy altogether.
2008: the monarchy ends
The interim parliament that emerged from the 2006 peace agreement and the second Jana Andolan set Nepal on a direct path away from monarchy altogether rather than back toward a reformed one. Elections for a Constituent Assembly, tasked explicitly with writing a new constitution and deciding the monarchy's fate, were held in April 2008; the Maoists, contesting as a political party for the first time since laying down arms, won the largest single bloc of seats, a result that reflected both their wartime organisational reach and broad public appetite for a genuine break from the old order.
On 28 May 2008, the newly elected Constituent Assembly voted to abolish the 240-year-old Shah monarchy and declared Nepal a federal democratic republic. Gyanendra vacated Narayanhiti Palace, which was converted into a public museum, and Nepal's first president was subsequently elected as ceremonial head of state under the new republican system, with executive authority now resting with a prime minister answerable to parliament rather than to a head of state. It was an unusually rapid and largely peaceful end to a monarchy that had, in one form or another, held at least ceremonial power in Nepal since Prithvi Narayan Shah's own conquest 240 years earlier, though the peace held only because the years immediately after 2006 absorbed most of the violent conflict the transition might otherwise have produced.
The 2015 constitution and federal Nepal
Writing Nepal's post-monarchy constitution took far longer than anyone expected in 2008, delayed repeatedly by disputes over how to divide the new federal republic's provinces, how to represent Nepal's many ethnic and regional groups fairly within them, and by a second Constituent Assembly election in 2013 after the first assembly failed to agree a text within its mandate. The constitution was finally promulgated in September 2015, remarkably in the same year as the devastating April 2015 earthquake, whose recovery is covered separately in how Nepal rebuilt after the 2015 earthquake; the two events, a new constitutional order and a national disaster, arrived within months of each other and both shaped the following decade of Nepali politics and reconstruction.
The 2015 constitution established Nepal's current structure: a federal republic of seven provinces, each with its own elected assembly and government, sitting beneath a national parliament and a ceremonial president, replacing the centralised, Kathmandu-dominated governance structure that had persisted in some form since unification in 1768. The new provinces were not universally welcomed, particularly in the southern Terai plains, where Madhesi and other plains-based communities organised sustained protests against province boundaries they viewed as diluting their political representation by joining Terai districts to hill districts within the same province, protests that at times turned violent and delayed the constitution's implementation in parts of the south for months. Boundary and representation disputes from that period have continued to surface in Nepali politics since, and the seven-province map remains a live political question rather than a fully settled administrative one. Federal Nepal is, in that sense, still a work in progress rather than a settled final chapter, the latest stage in a national story that has never actually finished being written since Prithvi Narayan Shah first looked down at the Kathmandu Valley from Gorkha in the 1740s, and each of the political fault lines described in this article, centre versus periphery, hereditary power versus elected government, and one region's identity versus the national map drawn around it, still visibly shapes ongoing debate inside Nepal's federal parliament today.
Sources
- John Whelpton, A History of Nepal (Cambridge University Press, 2005).
- International Crisis Group, Nepal's Faltering Peace Process, Asia Report No. 163 (2008).
FAQ
Who unified Nepal? Prithvi Narayan Shah, king of the small hill principality of Gorkha, unified Nepal. His campaigns from the 1740s culminated in the conquest of the Kathmandu Valley's three Malla kingdoms in 1768–1769, and his successors continued expanding the country's borders into the early 1800s before war with Britain fixed them.
When did Nepal become a republic? Nepal became a federal democratic republic on 28 May 2008, when the newly elected Constituent Assembly voted to abolish the 240-year-old Shah monarchy. The vote followed a decade-long Maoist civil war, a 2006 peace agreement and mass pro-democracy protests earlier that year.
What happened in the 2001 Nepalese royal massacre? On 1 June 2001, ten members of the royal family, including King Birendra, were shot dead at Narayanhiti Palace. The official investigation found Crown Prince Dipendra responsible before he took his own life, though alternative accounts persist and public trust in the official explanation has never been complete.
Was Nepal ever colonised? No. Nepal fought Britain to a negotiated settlement in the 1814–1816 Anglo-Nepalese War, ceding territory under the Sugauli Treaty but keeping its sovereignty throughout, making it one of the few South Asian states never brought under direct colonial rule.
How long was the Rana regime? The Rana family held hereditary power as prime ministers for 104 years, from the 1846 Kot Massacre that installed Jung Bahadur Rana until a negotiated settlement restored the king's authority in 1951, during which the Shah kings remained largely ceremonial figures confined to the palace.
See where this history happened, with someone who can explain it
Every place named in this article, a durbar square, a hilltop fort, a palace turned museum, sits on a real Kathmandu or central Nepal itinerary, and reading about the Kot Massacre or the 1768 conquest is a different experience from standing in Kathmandu's Durbar Square with a guide who can point to where each event actually took place. NepGem's licensed Kathmandu-area guides build history-focused days around the valley's three Durbar Squares, Narayanhiti Palace Museum and the wider republic-era sites, priced and booked the same way as a trekking day. Arrive solo, trek with a group: join a departure that already has other travellers on it and split the cost of a guide and transport across the group, rather than pricing a private historical tour alone from a standing start.


