text: The earliest known history of Newar and the Kathmandu Valley blends with mythology recorded in historical chronicles. One such text, which recounts the creation of the valley, is the Swayambhu Purana. According to this Buddhist scripture, the Kathmandu Valley was a giant lake until the Bodhisattva Manjusri, with the aid of a holy sword, cut a gap in the surrounding hills and let the water out. This legend is supported by geological evidence of an ancient lakebed, and it provides an explanation for the high fertility of the Kathmandu Valley soil.
  According to the "Swayambhu inscription", Manjusri then established a city called Manjupattan (Sanskrit "Land Established by Manjusri"), now called Manjipā, and made Dharmākara its king. A shrine dedicated to Manjusri is still present in Majipā.
  No historical documents have been found after this era until the advent of the Gopal era. A genealogy of kings is recorded in a chronicle called Gopalarajavamsavali. According to this manuscript, the Gopal kings were followed by the Mahispals and the Kirats before the Licchavis entered from the south. Some claim Buddha visited Nepal during the reign of Kirat King Jitedasti.
  The Newars reign over the valley and their sovereignty and influence over neighboring territories ended with the conquest of the Kathmandu Valley in 1769 by the Gorkhali Shah dynasty founded by Prithvi Narayan Shah.