after the deaths of the Paramara Bhoja and the Kalachuri Karna. Since the Kalachuris controlled the area around Varanasi before the Gahadavalas, it appears that Chandradeva captured this territory from them. The Kalachuri king defeated by him was probably Karna's successor Yashah-Karna. Chandradeva's inscriptions indicate that he also tried to expand his kingdom in the east, but the Pala chronicle Ramacharitam suggests that his plan was foiled by Ramapala's feudatory Bhimayashas. Consolidation Chandradeva was succeeded by Madanapala, who faced invasions from the Muslim Ghaznavid dynasty. He is identified with "Malhi", who was the king of Kannauj (Kanyakubja) according to the medieval Muslim chronicles. Diwan-i-Salman by the contemporary Muslim historian Salman states that Malhi was imprisoned by the Ghaznavids, and released only after the payment of a ransom. The Gahadavala inscriptions indicate that Madanapala's son Govindachandra led the military expeditions during his reign. As a result of these expeditions, the Ghaznavids were forced to conclude a peace treaty with the Gahadavalas. The Kṛtya-Kalpataru, written by his courtier Lakashidhara, suggests that he also killed a Ghaznavid general. Govindachandra succeeded his father as the Gahadavala king sometime during 1109-1114 CE. The Gahadavalas became the most prominent power of northern India as a result of his military conquests and diplomatic relations. His adoption of the Kalachuri titles and coinage indicate that he defeated a Kalachuri king, probably Yashah-Karna or his successor Gaya-Karna. As a prince, Govindachandra appears to have repulsed a Pala invasion, sometime before 1109 CE. The Pala-Gahadavala conflict halted for a few decades as a result of his marriage with Kumaradevi, a relative of the Pala monarch Ramapala. Epigraphic evidence suggests that there was a revival of the Pala-Gahadavala rivalry in the 1140s CE, during the reign of Govindachandra and the Pala monarch Madanapala (not to be confused with Govindachandra's father). Although the identity of the aggressor is not certain, the conflict seems to have happened over control of present-day western Bihar. Both Pala and Gahadavala inscriptions were issued in this area during this period. Decline The last extant inscription of Govindachandra is dated 1154 CE, and the earliest available inscription of his successor Vijayachandra is dated 1168 CE. Such a long gap is unusual for the dynasty, and may indicate troubled times arising out of an external invasion or a war of succession after Govindachandra's death. Vijayachandra faced a Ghaznavid invasion, which he seems to have repulsed sometime before 1164 CE.