By the 4th cent. A.D. the Newars of the central Katmandu valley had apparently developed a flourishing Hindu-Buddhist culture. From the 8th–11th cent. many Buddhists fled to Nepal from India, and a group of Hindu Rajput warriors set up the principality of Gurkha just west of the Katmandu valley. Although a Newar dynasty, the Mallas, ruled the valley from the 14th–18th cent., there were internecine quarrels among local rulers. These were exploited by the Gurkha king Prithvi Narayan Shah, who conquered the Katmandu valley in 1768.
Gurkha armies seized territories far beyond the present-day Nepal; but their invasion of Tibet, over which China claimed sovereignty, was defeated in 1792 by Chinese forces. An ensuing peace treaty forced Nepal to pay China an annual tribute, which continued until 1910. Also in 1792, Nepal first entered into treaty relations with Great Britain. Gurkha expansion into N India, however, led to a border war (1814–16) and to British victory over the Gurkhas, who were forced by treaty to retreat into roughly the present borders of Nepal and to receive a British envoy at Katmandu.
The struggle for power among the Nepalese nobility culminated in 1846 with the rise to political dominance of the Rana family. Jung Bahadur Rana established a line of hereditary prime ministers, who controlled the government until 1950, and the Shah dynasty kings were mere figureheads. In 1854, Nepal again invaded Tibet, which was forced to pay tribute from then until 1953.
Under the Ranas, Nepal was deliberately isolated from foreign influences; this policy helped to maintain independence during the colonial period but prevented economic and social modernization. Relations with Britain were cordial, however, and in 1923 a British-Nepalese treaty expressly affirmed Nepal's full sovereignty. Nepal supplied many troops for the British army in both world wars.
The successful Indian movement for independence (1947) stimulated democratic sentiment in Nepal. The newly formed Congress party of Nepal precipitated a revolt in 1950 that forced the autocratic Ranas to share power in a new cabinet. King Tribhuvan Bir Bikram, who sympathized with the democratic movement, took temporary refuge in India and returned (1951) as a constitutional monarch. In 1959 a democratic constitution was promulgated, and parliamentary elections gave the Congress party a clear majority.
The following year, however, King Mahendra (reigned 1956–72) cited alleged inefficiency and corruption in government as evidence that Nepal was not ready for Western-style democracy. He dissolved parliament, detained many political leaders, and in 1962 inaugurated a system of "basic democracy," based on the elected village council (panchayat) and working up to district and zonal panchayats and an indirectly elected national panchayat. Political parties were banned, and the king was advised by a council of appointed ministers. King Mahendra carried out a land reform that distributed large holdings to landless families, and he instituted a law removing the legal sanctions for caste discrimination. Crown Prince Birenda succeeded to the throne (1972) upon his father's death; like previous Nepalese monarchs, he married a member of the Rana family in order to ensure political peace.
Prior to 1989, Nepal maintained a position of nonalignment in foreign affairs, carefully balancing relationships with China, the USSR, the United States, and India. The USSR and the United States were major aid donors. A 1956 treaty with China recognized Chinese sovereignty over Tibet and officially terminated the century-old Tibetan tribute to Nepal; all Nepalese troops left Tibet in 1957. The Sino-Nepalese border treaty of 1961 defined Nepal's Himalayan frontier.
India's geographical proximity, cultural affinity, and substantial economic aid render it the most influential foreign power in Nepal, but its military and political interference in Nepal's affairs has been a constant source of worry for the government. In 1969, Nepal canceled an arms agreement with India and ordered the Indians to withdraw their military mission from Katmandu and their listening posts from the Tibet-Nepal frontier. In 1989 the Indian government closed its borders with Nepal to all economic traffic, bringing Nepal's economy to a standstill. During the early 1990s, Nepal developed closer ties with China. In the 1980s and 1990s thousands of ethnic Nepalese from Bhutan were forced to take up residence in UN refugee camps in Nepal. In 2003 an agreement was reached that allowed some of the refugees to return to Bhutan, but most remained in camps in Nepal. Some began being resettled overseas in 2008, and by the end of 2010 more than 40,000 had left.
Weeks of street protests and general strikes forced King Birenda to proclaim (Nov., 1990) a new constitution that legalized political parties, asserted human rights, abolished the panchayat system, and vastly reduced the king's powers in a constitutional monarchy. In the 1991 parliamentary elections, the centrist Nepali Congress party won a slim majority and formed a government, which collapsed in 1994. Following a succession of failed coalition governments, the Congress party once again won a majority in the 1999 legislative elections, and Krishna Prasad Bhattarai became prime minister. Meanwhile, a Maoist insurgency began in rural Nepal during the mid-1990s.
In Mar., 2000, concern within the Congress party over Bhattarai's administration forced his resignation, and Girija Prasad Koirala became prime minister, holding the office for the fourth time. The king and many members of the royal family were killed in June, 2001, by the crown prince, apparently because of his parents' objection to his proposed marriage; the prince committed suicide. The king's brother, Prince Gyanendra, succeeded to throne; Gyanendra, unlike Birenda, had opposed the 1990 constitution.
In July, 2001, Koirala resigned and Sher Bahadur Deuba, also of the Nepali Congress party, became prime minister. In November negotiations with the Maoist rebels broke down and serious fighting began; the rebels won control of a significant portion of Nepal. In May, 2002, Congress party infighting led Deuba to dissolve parliament and seek new elections, which prompted the party to expel him and call for his cabinet to resign, which mostly did not. When Dueba called (Oct., 2002) for the postponement of elections for a year, the king removed him from office and named Lokendra Bahadur Chand, a former prime minister and monarchist, to the post. Elections were postponed indefinitely.
In Jan., 2003, a cease-fire was signed with the rebels, and negotiations began, although there were occasional violations of the cease-fire. In May growing opposition demonstrations against the government led Chand to resign, but hopes for a compromise with the opposition were dashed when the king named Surya Bahadur Thapa, a royalist, as prime minister and effectively brought all of the country's administrative powers under control of the crown. The rebels withdrew from the inconclusive negotiations in Aug., 2003, and fighting between government troops and rebel forces soon resumed. Neither the army nor the Maoists gained full control of the countryside, parliament remained dissolved, and there were increasing public protests against the king.
In Apr., 2004, the king promised to hold parliamentary elections in 2005. The following month the prime minister resigned, and in June the king appointed Deuba to the post. Deuba subsequently formed a broad-based coalition government. Despite government offensives against the rebels, they remained strong enough to enforce their will. In August and December the rebels again called successful blockades of the capital; they also began forcing the closure of a number of businesses.
Declaring that the cabinet had failed, the king dismissed the government in Feb., 2005, and declared a state of emergency, placing opposition figures under arrest. He assumed direct control of the government as chairman of a new cabinet. Many political prisoners were released in April, and the emergency ended in May, but the king retained the powers he had assumed. In July, 2005, Deuba and several others were convicted and sentenced on corruption charges by an anticorruption commission established by the king.
Nepal's two largest parties, the Congress and the Communist (United Marxist-Leninist), subsequently ended their support for a constitutional monarchy, and in September the Maoist rebels declared a three-month cease-fire. Nepal's opposition parties and the rebels agreed in Nov., 2005, jointly to support the reestablisment of constitutional democracy in the country, and the rebels then extended their cease-fire for a month. In Jan., 2006, however, the rebels announced the cease-fire would end because the government had continued its operations against them. By April, when the king offered to restore a democratic government, the situation in the country had become even more troubled, with the prodemocracy demonstrations and the government response to them increasingly confrontational and violent.
The reinstatement of parliament in April ushered in a rapid series of governmental changes. Koirala again became prime minister, and his government respond to the rebels' three-month cease-fire with an indefinite one. The monarchy was stripped of its powers and privileges, although not abolished, and Nepal was declared a secular nation. The government began talks with the rebels, who in June agreed in principle to join an interim government. Some 16,000 people are believed to have died in the country's decade-long civil war.
A Nov., 2006, accord called for the rebels to join the government and assemble in camps and place their weapons under UN supervision, and the following month an interim constitution under which the monarch was not head of state was agreed to. The question of the ultimate abolition of the monarchy was left to a constituent assembly that would be elected in 2007. Human-rights groups accused the rebels, however, of continuing to engage in extortion and conscription. In Jan., 2007, the rebels joined the interim parliament and the interim constitution came into effect; in April they joined a new interim government. Although some 31,000 rebels were in camps by late February, far fewer numbers of weapons had been sequestered. Also in January, long-simmering resentment of the native peoples of the Terai, known as Madhesis, led to protests and violence in S Nepal as the Madhesis pressed their demands for autonomy for the Terai. Although the government subsequently reached an agreement with the Madhesis, violence in the region continued throughout the year.
The government and the Maoists agreed to hold elections for the assembly in late 2007, and in June, 2007, parliament passed a constitutional amendment giving it the power to abolish the monarchy. The government later voted to nationalize the royal palaces and other royal property. The rebels withdrew from the government in Sept., 2007, demanding the monarchy be abolished before any elections, and the assembly elections were subsequently postponed into 2008. In Dec., 2007, the parliament voted to abolish the monarchy and establish a republic in Apr., 2008, after the constituent assembly elections; the Maoists then returned to the government.
In Feb., 2008, resurgent unhappiness in the Terai with the government led to a Madhesi strike and blockade that kept fuel and other supplies from Katmandu. The Maoists were accused of intimidating both voters and opposing candidates in rural areas in the campaigning for the April vote, but in the balloting for assembly members the Maoists led all other parties, doing well in both rural and urban areas and winning more than a third of the seats. At the constituent assembly's first meeting (May, 2008) its members voted to abolish the monarchy. The following month, after Maoists resigned from their cabinet seats, Prime Minister Koirala resigned.
In July, Nepal's first president, Ram Baran Yadav, was elected by the assembly with the support of Nepal's major non-Maoist parties. Yadav, a Madhesi and member of the Congress party, defeated the Maoist-backed candidate when Madhesi Janaadhikar Forum switched its support to Yadav. However, the Maoist leader Pushpa Kamal Dahal, better known by his nom de guerre, Prachanda, was elected prime minister with the support of most of the major parties in Aug., 2008. Prachanda resigned as prime minister in May, 2009, when the president reversed Prachanda's firing of the army chief, who was accused of disobeying government orders; Madhav Kumar Nepal, a Communist, subsequently became prime minister.
The Maoists mounted protests and strikes against the president, calling for an apology, but the government refused to negotiate. In the months following, progress toward drafting and adopting a new constitution was slow, and the timetable was extended several times. In June, 2010, the prime minister resigned in an unsuccessful attempt to resolve the political deadlock, but the parties were unable to agree on a new prime minister. Jhalanath Khanal, a Communist, was finally elected prime minister in Feb., 2011; in March the Maoists joined the new government.
Failure to reach an agreement on integrating rebel forces into the military led Khanal to resign in August, and Maoist party vice chairman Baburam Bhattarai was elected to succeed him. In November, the parties finally agreed to merge some 6,500 rebels into the armed forces. After the supreme court refused to extend the deadline for writing a constitution further, the government collapsed in May, 2012, after several parties withdrew. No agreement on a constitution was reached, and the assembly was dissolved.
Elections were called for Nov., 2012, but they were postponed after opposition parties refused to participate unless the prime minister resigned first. In Mar., 2013, an interim election government headed by the supreme court's chief justice, Khilray Regmi, was established. The constituent assembly elections were finally held in Nov., 2013, and resulted in significant gains for the Congress and Communist parties; the Maoists placed third. The Maoists asserted that the results were due to fraud, but agreed to join the assembly on condition that a parliamentary investigation into the election was conducted.