The Gopala dynasty (also known as Gupta dynasty) was a first dynasty of Nepal founded by Gops or Ahirs in the Kathmandu valley. The Lunar dynasty is the origin of the Gopala. The Kings of Gopala Bansha ruled over Nepal for 505 or 521 years. It was replaced by rulers of Mahisapala dynasty. Both the Krishna and Mahisapalas have connections to the Gopalas.
According to legendary accounts, the early dynasty of Nepal was the Gopala dynasty established by Gopa, who presumably ruled for about five centuries. They are said to have been followed by the Mahisapala dynasty. The Gopalas and the Mahisapalas were together known as Abhiras.
Another belief was that Gopalvamsi and Mahispalvamsi belonged to the same dynasty and they were divided into two on the basis of their profession. Amarakosha gives Abhira as synonym for Gopa and Gopala.
The 8 rulers of the Gopala dynasty (with their traditional reign lengths) were:
Each ruler was the son of the previous one.
The rulers of Gopala dynasty were devotees of Lord Shiva. They are credited with restoring the temple of the Vedic deity Pashupatinath on the volcanic mound in Nepal, where the famous Pashupatinath Temple now stands.