Local legends have it that a Hindu sage named "Ne" established himself in the valley of Kathmandu in prehistoric times, and that the word "Nepal" came into existence as the place was protected ("pala" in Pali) by the sage "Nemi". It is mentioned in Vedic texts that this region was called Nepal centuries ago. According to the Skanda Purana, a rishi called "Nemi" used to live in the Himalayas. In the Pashupati Purana, he is mentioned as a saint and a protector. He is said to have practised meditation at the Bagmati and Kesavati rivers and to have taught there.
The name of the country is also identical in origin to the name of the Newar people. The terms "Nepāl", "Newār", "Newāl" and "Nepār" are phonetically different forms of the same word, and instances of the various forms appear in texts in different times in history. Nepal is the learned Sanskrit form and Newar is the colloquial Prakrit form. A Sanskrit inscription dated 512 CE found in Tistung, a valley to the west of Kathmandu, contains the phrase "greetings to the Nepals" indicating that the term "Nepal" was used to refer to both the country and the people.
It has been suggested that "Nepal" may be a Sanskritization of "Newar", or "Newar" may be a later form of "Nepal". According to another explanation, the words "Newar" and "Newari" are vulgarisms arising from the mutation of P to V, and L to R.