established a kingdom that may have extended to Uttarkashi. A 5th century CE inscription in the Uttarkashi Vishwanath temple mentions a prince called Ganeshwara whose son had commissioned the inscription to honour himself and his father. The city of Uttarkashi is mentioned as Brahmapura by Xuanzang, who notes it was ruled by queens. In the 7th century, a branch of the Katyuris pushed out the descendants of Rajapala of Badrinath to the position of feudatories and established an empire covering what is now Kumaon and Garhwal. The last descendant of Rajapala was Bhanupratapa, the pre-eminent chief among the 52 rulers called (fort holders, from where Garhwal derives its name). Bhanupratapa had two daughters, one of whom he married to a Paramara prince from Malwa, Kanak Pal, who was on pilgrimage. Kanak Pal was made his heir, and ascended the throne in 888 CE. Kanakpal and his descendants began establishing their hegemony over the other petty chiefs, some of whom had headquarters in Uttarkashi, as the power of their Katyuri overlords declined. Up to the first half of the 11th century, nothing is known about the first 10 rulers of the Garhwal kingdom. They were probably feudatories of the Katyuris who ruled over parts of Uttarkashi. By the time of the end of the 11th century, when the Katyuri hegemony collapsed, the family of Kanakpal were regarded as the most pre-eminent of the 52 traditional . Near the end of the 12th century, Ashoka Challa of the Khasa kingdom (now in western Nepal) conquered Garhwal as far as Uttarkashi, evidenced by an inscription in the Barahat (Uttarkashi) Vishwanath temple. However the Garhwal rajas soon regained their position, and again the last king of the line had only a daughter. Another Paramara prince from Malwa there on pilgrimage, Kadilpal, was made his heir and married his daughter, although it is unknown whether this story is merely apocryphal. His descendant, Ajapal, lived during 1358-70 and was attacked by the raja of Champawat, but defeated him. Ajapal also seemingly created an alliance of the many chieftains of Garhwal and overthrew the raja of Chandpur. His descendant Rajapal led an unsuccessful expedition against Tibet that probably passed through modern Uttarkashi district. The Garhwal rajas, although friendly with the Delhi sultanate in the plains, were never subordinate to them. Rajapal's descendant Man Shah led raids north into Tibet and south into the plains in the mid