Buddhist and Brahmanic Hindu versions of Newar legends dominate the early history of Nepal. The ancient Indian classics contain references to the Nepal valley and lower hill areas. During the 3rd century BC, the emperor of India, Ashoka, supposedly visited Nepal.
During the Licchavi dynasty in the 4th or 5th century AD, commerce through the Himalayan passes transformed the isolated Nepal Valley into an intellectual and cultural canter. In the mid-7th century contact with China was initiated as the two countries exchanged missions. The Malla dynasty ruled Nepal between the 10th and 18th century. Yaksa Malla (reigned c.1429-82) divided the kingdom into three independent principalities, which by the 16th century were ruled by independent dynasties.
In 1769 the Gurkhas, led by Prithvi Narayan Shah, conquered the Nepal Valley. He moved the capital to Kathmandu, providing the foundation for modern Nepal.
From 1775 to 1951 Nepali politics were characterized by conflict between the royal family and several noble families. Often the Shah rulers were relegated to honorary positions, while the political power was concentrated within a dominant noble family.
The British conquest of India forced the Nepali rulers to seek an accommodation with the British to preserve their independence. In 1860 an agreement was reached that permitted the recruitment of Nepalis for service in the British Indian Army.
In 1950 Nepalis living in India formed an alliance with members of the royal family to oust the Rana regime, the dominant noble family since 1846. With support from the Indian government at New Delhi, royal Nepali sovereignty was restored, and revolutionary forces gained a position in the administration.
A constitution was approved in 1959, and parliamentary elections were held. Controversy arose between crown and Cabinet in 1960, and King Mahendra dismissed the congress and imprisoned many members. In 1962 a new constitution was promulgated giving the crown much greater authority. Though the country was then nominally a constitutional monarchy, the king for many years exercised autocratic control over the country's multitiered system of panchayats, or councils, which extended from the village to the national level. The king was able to dominate the Council of Ministers and much of the National Assembly without opposition because political parties were banned under the constitution. In 1972 King Mahendra died and was succeeded by his son Birendra. King Birendra continued the nonparty political system established by his father. In 1990 a series of demonstrations and protests over the king's autocratic rule forced him to lift the ban on political parties and to accept a new cabinet composed largely of opposition political figures. That year a new constitution was also approved that provided for a multiparty democracy and a bicameral parliament.