Neolithic tools found in the Kathmandu Valley indicate that people have been living there for at least 9,000 years. It appears that people who were probably of Kirat ethnicity lived in Nepal more than 2,500 years ago. The Kiratis are a tribe of jungle and mountain people who migrated from various parts of Central Asia, China and the Himalayas.
Nepal’s very first recorded, though still legendary, history began with the Kiratis, who may have arrived from the west to the Kathmandu valley. Little is known about them, other than their deftness as sheep farmers and great fondness for carrying long knives. Their first king was Elam; also known as Yalambar, who is referenced in the epic Mahabharata.
The last king of the Kirat dynasty was Gasti, a weak ruler, who is said to have been overthrown by the Somavanshi ruler Nimisha. This ended the powerful Kirata dynasty that had lasted for about 1225 years. After their defeat, the Kiratas moved to the Eastern hills of Nepal and settled down, divided into small principalities. Their settlements were divided into three regions, i.e. ‘Wallokirat’ that lay to the East of the Kathmandu Valley, ‘Majkirat’ or Central Kirat region and ‘Pallokirat’ that lay to the far East of the Kathmandu valley.
Around 1000 BC, small kingdoms and confederations of clans arose in the region. From one of these, the Shakya confederation, arose a prince named Siddharta Gautama (563-483 BC), who later renounced his royalty to lead an ascetic life and came to be known as the Buddha (“the enlightened one”). The 7th Kirati king, Jitedasti, was on the throne in the Nepal valley at the time. By 250 BC, the region came under the influence of the Mauryan Empire of northern India, and later became a vassal state under the Gupta Empire in the fourth century AD. In the 5th century, rulers called the Licchavis governed the majority of its area. There is a good and quite detailed description of the kingdom of Nepal in the account of the renowned Chinese Buddhist pilgrim monk Xuanzang, dating from c. 645 AD. The Licchavi dynasty went into decline in the late 8th century and was followed by a Newari era, from 879, although the extent of their control over the entire country is uncertain. By the late 11th century, southern Nepal came under the influence of the Chalukaya Empire of southern India. Under the Chalukayas, Nepal’s religious establishment changed as the kings patronised Hinduism instead of the prevailing Buddhism.
By the early 12th century, leaders were emerging whose names ended with the Sanskrit suffix malla (“wrestler”). Initially their reign was marked by upheaval, but the kings consolidated their power and ruled over the next 200 years; by the late 14th century, much of the country began to come under a unified rule.
Early Malla rule started with Ari Malla in the 12th century. Over the next two centuries his kingdom expanded widely, into the Terai and western Tibet, before disintegrating into small principalities, which later became known as the Baise (i.e. the 22 principalities), along with the emergence of the Chaubisi (i.e. 24 principalities). The history of these principalities is recorded in some stone and copper plate inscriptions of western Nepal that largely remain unedited.
Jayasthiti Malla, with whom commences the later Malla dynasty of the Kathmandu Valley, began to reign at the end of the 14th century. Though his rule was rather short, his place among the rulers in the Valley is eminent for the various social and economic reforms such as the Sanskritisation of the Valley people, new methods of land measurement and allocation etc. Yaksha Malla, the grandson of Jayasthiti Malla, ruled the Kathmandu Valley until almost the end of the 15th century.
After his demise, the Valley was divided into three independent Valley kingdoms: Kathmandu, Bhaktapur and Patan in about 1482. This division led the Malla rulers into internecine clashes and wars for territorial and commercial gains. Mutually debilitating wars gradually weakened them, that facilitated conquest of the Kathmandu Valley by King Prithvi Narayan Shah of Gorkha. The last Malla rulers were Jaya Prakasha Malla, Teja Narasingha Malla and Ranjit Malla of Kathmandu, Patan and Bhaktapur respectively.
After decades of rivalry between the medieval kingdoms, modern Nepal was created in the latter half of the 18th century, when Prithvi Narayan Shah, the ruler of the small principality of Gorkha, formed a unified country from a number of independent hill states. Prithvi Narayan Shah dedicated himself at an early age to the conquest of the Kathmandu Valley and the creation of a single state, which he achieved in 1768.
Prithvi Narayan Shah (c. 1769-1775), was the 9th generation descendant of Dravya Shah (1559-1570), the founder of the ruling house of Gorkha. Prithvi Narayan Shah succeeded his father King Nara Bhupal Shah to the throne of Gorkha in 1743 AD. King Prithvi Narayan Shah was quite aware of the political situation of the Valley kingdoms as well as of the Barsi and Chaubisi principalities. He foresaw the need for unifying the small principalities as an urgent condition for survival in the future and set him self to the task accordingly.