Fact, myth, and legend are intertwined in Nepal's historical literature, which, in the Vamshavali, traces the origins of the country in the distant past when Nepal was allegedly founded by Ne-Muni and derived its name from this source. A reliable chronology can be established only after the conquest of Nepal by Harisinha-deva, rajah of Simraun in about 1324. Under the Malla dynasty, Nepal was administered in four separate states: Banepa, Bhadgaon (now Bhaktapur), Kantipur (modern Ka¯thmāndu), and Lalitpur (now Patan). Prithwi Narayan Shah, the ruler of Gorkha, a small principality west of Ka¯thmāndu, established the modern kingdom of Nepal in 1768 by incorporating the Ka¯thmāndu Valley into his domain and unifying with it many small independent principalities and states. Under his descendants, most of the present boundaries of Nepal were established and Hinduism was introduced from India as the official religion.
Nepal came in contact with the influence of larger powers outside South Asia in the late 18th century as a consequence of the British East India Company's conquest of India to its south and a trade dispute with Tibet that led to a Nepalese confrontation with China. Peace was imposed by China in 1792, after Chinese forces had invaded, then withdrawn from Nepal. In the same year, a commercial treaty was ratified between Britain and Nepal. Relations with the British in India remained peaceful until 1814 when a border dispute led to inconclusive hostilities between Nepal and the British East India Company. When the fighting ended two years later, Nepal's independence was preserved in an agreement in which Nepal yielded a large piece of territory to the Company on its southern border and agreed to the establishment of a permanent British resident at Ka¯thmāndu. The 1816 agreement (reaffirmed by a formal treaty of friendship between Nepal and Great Britain in 1923) also laid the groundwork for more than a century and a half of amicable relations between Britain and Nepal. Included under the agreement was Nepalese approval for British recruitment of Nepalese Gurkha mercenaries for the British-officered Indian army. During the Indian Mutiny of 1857, Nepal's Rana prime minister sent some 12,000 additional Nepalese troops in support of British garrisons; he also offered troops to US president Abraham Lincoln in 1866 during the US Civil War. Over the years, the Gurkha regiments serving in the British Indian army (and after 1947 under both Indian and British flags) won renown for their bravery, skill, and endurance—in Afghanistan in 1879 and Tibet in 1904, in Europe, Asian, and Africa in the 20th century's two world wars, in the UN action in the Belgian Congo in the 1960s, in India's conflicts with China and Pakistan, and in 1982, in Britain's conflict with Argentina over the Falkland Islands.
In 1846, Shumshere Jung Bahadur (Rana) became Nepal's de facto ruler, banishing the king and ruling as regent for the king's minor heir. The prime ministership became a hereditary office in his Rana family, not unlike the Tokugawa Shogunate in Japan, ruling successively until 1951. Following the end of World War II, the termination of British rule on the South Asian subcontinent in 1947 caused deep stirrings of change in Nepal. Resentment grew against the autocratic despotism of the Ranas, who—as regents— had kept successive monarchs virtual prisoners. A political reform movement, begun in 1946 with the founding of the Nepali Congress Party on the model of the Indian Congress Party, won the support of King Tribhuvana Bir Bikram Shah, but in a power struggle in 1950, the king was forced to flee from the Ranas to India. With Indian support, insurgents began operations against the Rana government until, with the mediation of Indian Prime Minister Nehru, a political compromise was reached that returned the king to Ka¯thmāndu and ended a century of hereditary Rana family rule. By late 1951 a new government took office, headed by Matrika Prasad Koirala, with his brother, a cofounder of the Nepali Congress Party (NC).
Political life in Nepal in the years since the restoration of the monarchy in 1951 has been dominated by the struggle between the monarchy and the country's political elements to define the terms under which they will co-exist and bring the country into the modern world. Six different cabinets, each lacking popular support and riddled with dissension, held office in rapid succession between 1951 and 1957, and in 1957-58, King Mahendra Bir Bikram Shah, who had succeeded to the throne upon the death of his father in 1955, ruled directly for a period of months. In April 1959, he promulgated a democratic constitution, providing for a constitutional monarchy, two houses of parliament, and a cabinet and prime minister responsible to the lower house, in the Westminster model. Bisweswar Prasad (B.P.) Koirala of the NC assumed office on 24 July 1959 as first prime minister under this constitution.
Less than 18 months later, on 15 December 1960, the king suspended the constitution, dissolved parliament, dismissed the cabinet, and again established his own government, this time with an appointed council of ministers. He ruled directly until April 1962 when he promulgated a new constitution establishing an indirect, non-party system of rule through a tiered system of panchayats (council) culminating in a National Panchayat. Five years later, after growing agitation and hit-and-run attacks by NC elements based in India, the king—again under Indian pressure— promulgated a series of amendments introducing gradual liberalization.
In January 1972, Mahendra died suddenly and was succeeded by his 27-year-old son, Birendra Bir Bikram Shah Dev. The young monarch, who had attended Harvard University in the United States, was committed to maintaining the authority of the monarchy while keeping Nepal on the course of gradual political and social reform set by his father. Student demonstrations in early 1979 led him to call for a national referendum on whether to continue the panchayat system or create a more conventional multi-party system. With the king promising further liberalization, the existing panchayat system was endorsed by 55% of the voters in May 1980, and later that year, the king's subsequent constitutional amendments established direct elections and permitted the Panchayat, not the king, to choose the prime minister. The king's failure to lift the ban on political parties led party members—ineffectively—to boycott the elections of 1981 in which Surya Bahadur Thapa, a former civil servant who had become prime minister in 1979, was reaffirmed in June 1981 and continued in office until 1983 when he was replaced by Lokendra Bahadur Chand following the government's loss of its majority on an opposition "no confidence" motion.
In non-party elections to the National Panchayat in May 1986, again in the face of a major party boycott, a majority of the incumbents were defeated, and Marich Man Singh Shrestha became prime minister. Most new members were opponents of the panchayat system, foreshadowing a new struggle between the king and his legislators. By early 1990, the NC and the United Leftist Front (ULF), a Communist alliance of seven parties, again went to the streets, organizing agitations that forced the king to make further constitutional changes in April; included were an end to the ban on political parties and their activities. The king dissolved the National Panchayat and appointed NC president Krishna Prasad Bhattarai interim prime minister, who was assisted by a cabinet made up of members of the NC, the ULF, independents, and royal appointees. A Constitutional Reforms Commission produced a new constitution in November 1990 that ended the panchayat era and restored multi-party democracy in a constitutional monarchy. In May 1991, the first openly partisan elections in 32 years were held, resulting in an NC majority in the new House of Representatives which chose Girija Prasad Koirala as prime minister. As of December 2002, Koirala had held the office of prime minister four times in his career.
On 1 June 2001, the former Crown Prince Dipendra Bir Bikram killed most of the royal family with an assault rifle as they sat around a dinner table. Although many theories circulated as to the motive for the killings, it is generally accepted that he turned against his family because his mother did not approve of a young woman as his choice of bride. Dipendra murdered his father, King Birendra, his mother, Queen Aishwarya, his sister, Princess Sruti, his brother, Prince Nirajan, and five others. He then shot himself in the head. Dipendra was anointed king while in a coma; two days later he died, and his uncle, Gyanendra Bir Bikram Shah Dev, was named king.
In addition to the slayings, Nepal has been embroiled in civil war. In 1996, a "people's war" was launched by several Maoist organizations in the central-western hill districts of Nepal. The Maoists' aims are the removal of the constitutional monarchy and the eradication of rural poverty. As of December 2002, more than 7,000 people had been killed in the fighting. The insurgents call themselves the Communist Party of Nepal (Maoist), modeled after Peru's Maoist Shining Path guerrillas. As of December 2002, they controlled 40% of Nepal, and brought the economy and political system to a virtual standstill. They are led by Chhabi Lal Dahal, or "Prachanda," who is seen by his followers as charismatic and by his enemies as fanatical. In July 2001, the Maoists came into direct combat with the Nepalese army for the first time, and stepped up their campaign of violence. Koirala, who was prime minister at the time, resigned after losing support from his ruling coalition, and alluded to the violence as a reason why the country needed to work for national consensus. Sher Bahadur Deuba became prime minister. In November 2001, after more than 100 people were killed in four days of violence, the king called a state of emergency. The emergency measures restricted freedom of the press, as well as freedom of assembly, expression and movement. Suspects could be detained for three weeks without charges.
In February 2002, international donor agencies and individual nations pledged US $2.5 billion to Nepal, and the government increased military activity against the insurgents. In April, more than 300 people were killed in two of the most serious attacks of the rebellion, and the Maoists ordered a five-day national strike. Parliament was dissolved on 22 May, and national elections were scheduled for 13 November. In October, Prime Minister Deuba asked the king to put off the national elections for a year due to the mounting Maoist violence. King Gyanendra dismissed him and indefinitely put off the elections. Lokendra Bahadur Chand was appointed prime minister until elections are held.
In the area of foreign policy, Nepal has remained generally nonaligned, maintaining friendly relations with China and with India, despite efforts to minimize traditional Indian influence and the occasional clash of policies on matters relating to trade. In 1961, Nepal signed an agreement with China (which had earlier absorbed Tibet) defining the boundary between the two countries along the traditional watershed. Nepal was uninvolved in the 1962 hostilities between India and China on portions of the border to the east and west of Nepal. One result of this conflict however, was India's occupation of Kalapani, a border region of northwestern Nepal which, as of December 2002, was still a matter of dispute with India. The refugee issue of some 100,000 Bhutanese in Nepal remained unresolved as of December 2002. Ninety percent of these displaced persons are housed in seven United Nations Offices of the High Commissioner for Refugees (UNHCR) camps. Nepal also has pursued friendly relations with the great powers and has been the recipient of economic aid from India, the United States, the former USSR, and the World Bank.