Nepal's recorded history began with the Kiratis, who arrived in the Kathmandu valley in the 7th or 8th century BCE from the east. Little is known about them, other than their deftness as sheep farmers and fondness for carrying long knives. The Kirats ruled for about 1225 years (800 BCE-300 CE), they had a total of 28 kings during that time. Their first and best remembered king was Yalamba Haang, who is mentioned in the epic Mahabharata.
The first record of the word Nepal is found in ancient Indian annals such as the puranas from the 4th century A.D where an area known as 'Newal' or sometimes as 'Newar' is mentioned, referring to what is now known as the Kathmandu Valley. However, the area of the sovereign state of Nepal has changed from time to time during its history, expanding and shrinking in area since ancient times.
Of the kings originating inside or outside of modern Nepal, a common characteristic of attempting to unify Nepal from mostly west to east, along the southern track of the Himalayas and the northern plain of Ganges, can be identified. No Nepalese ruler has been recorded attempting to cross the Himalayas to expand their states into Tibet or China, and none has been recorded trying to cross the Ganges plain into modern India. For the most part, Nepalese rulers seem to have been focused on the territories that more or less comprise modern-day Nepal, between the region of Kashmir in the west and Bhutan in the east.
Nepal as a political region has been united by different kings of different kingdoms at various times in Nepalese history. Common tradition holds that among the first uniters of Nepal was a king by the name of Mandev, who ultimately controlled territory from the Brahmaputra River in the east and Gandaki in the west. Recorded details of his unification, however, are scarce, and thus Mandev's actions and his very existence cannot be definitively confirmed. The same may be said for various early recorded and traditional (i.e. not necessarily recorded) rulers of Nepal, all of whose kingdoms apparently broke up when their dynasties died out. While records and documents of several such rulers do exist, a lack of interest has made their accessibility difficult and limited the number of translations and analyses.
Nepal is first mentioned in the late Vedic text, Atharvaveda Parisista as a place exporting blankets, and in the post-Vedic Atharva Siras Upanisad.[19] In Samudragupta's Allahabad inscription it is mentioned as a bordering country. The 'Skanda Purana' has a separate chapter known as 'Nepal Mahatmya', which "explains in more details about the beauty and power of Nepal." Nepal is also mentioned in Hindu texts such as the Narayana Puja.[19]
According to Gopal Vansawali, the genealogy of Nepalese monarchy, the earliest settlers in Nepal were Gopalas, followed by Mahispala, followed by Kirata.[20] Tibeto-Burman people probably lived in Nepal 2,500 years ago.[20] However, there is no archaeologic evidence of Gopala, Mahispala or Kirata rulers other than later documents (Lichchavi and Malla era) mentioning them.[21]
Around 500 BCE, small kingdoms and confederations of clans arose in the southern regions of Nepal. From one of these, the Shakya polity, arose a prince named Siddharta Gautama (traditionally dated 563-483 BCE), who later renounced his status to lead an ascetic life and came to be known as the Buddha ("the enlightened one"). It is believed that the 7th Kirata king, Jitedasti, was on the throne in the Nepal valley at the time. By 250 BCE, the southern regions came under the influence of the Mauryan Empire of northern India, and Nepal later on became a nominal vassal state under the Gupta Empire in the fourth century CE. Beginning in the 3rd century CE, rulers called the Licchavis governed the Kathmandu Valley and surrounding central Nepal.
There is a quite detailed description of the kingdom of Nepal in the account of the renowned Chinese Buddhist pilgrim monk Xuanzang, dating from c. 645 CE.[22][23]
The Licchavi dynasty went into decline in the late eighth century, probably due to Tibetan dominance, and was followed by Thakuri era, from 879 CE (Nepal Samvat 1), although the extent of their control over the country is uncertain. In the 11th century it seems to have included the Pokhara area.