Before the unification of Nepal, the Kathmandu valley was known as Nepal Rajya.[b] The precise origin of the term Nepāl is uncertain. A number of plausible theories are found in religious as well as academic texts. Nepal appears in ancient Indian literary texts dated as far back as the fourth century BC. However, an absolute chronology can not be established, as even the oldest texts may contain anonymous contributions dating as late as the early modern period. On the other hand, academic attempts to provide a plausible theory suffer from lack of a complete picture of history, and insufficient understanding of linguistics or of relevant Indo-European and Tibeto-Burman languages.
According to Hindu mythology, Nepal derives its name from an ancient Hindu sage called Ne, referred to variously as Ne Muni or Nemi. According to Pashupati Purana, as a place protected by Ne, the country in the heart of the Himalayas came to be known as Nepal.[c] According to Nepal Mahatmya,[d] Nemi was charged with protection of the country by Pashupati. According to Buddhist mythology, Manjushri Bodhisattva drained a primordial lake of serpents to create the Nepal valley and proclaimed that Adi-Buddha Ne would take care of the community that would settle it. As the cherished of Ne, the valley would be called Nepal. According to Gopalarajvamshavali, the genealogy of ancient Gopala dynasty compiled circa 1380s, Nepal is named after Nepa the cowherd, the founder of the Nepali scion of the Abhiras. In this account, the cow that issued milk to the spot, at which Nepa discovered the Jyotirlinga of Pashupatinath upon investigation, was also named Ne.
Norwegian Indologist Christian Lassen proposed that Nepala was a compound of Nipa (foot of a mountain) and -ala (short suffix for alaya which means abode), and therefore, Nepala meant "abode at the foot of the mountain". He considered Ne Muni to be a fabrication. Indologist Sylvain Levi found Lassen's theory untenable but had no theories of his own, only suggesting that either Newara is a vulgarism of sanskritic Nepala, or Nepala is Sanskritisation of the local ethnic. Levi's view has some support in later works. The idea that Nepal is a polished form of Newar, the name of the indigenous people of Kathmandu valley, may be gaining support, but it leaves the question of etymology unanswered. One theory proposes that Nepa is a Tibeto-Burman stem consisting of Ne (cattle) and Pa (keeper), which alludes to the fact that early inhabitants of the valley were Gopalas (cowherds) and Mahispalas (buffalo-herds). Suniti Kumar Chatterji thought that 'Nepal' originated from Tibeto-Burman roots- Ne, of uncertain meaning (as multiple possibilities exist), and pala or bal, whose meaning is lost entirely.