Kirtivarman II (r. 744/5–55 CE), the last Chalukya king, managed to lose to his southern countries as a result of his battles with the Pandyas. Pandya kings Maravarman Rajasimha I (r. 730–65 CE) and Nedunjadaiyan/Varagunavarman I (r. 765–815 CE) threatened Pallava king Nandivarman II Pallavamalla (r. 731–96 CE) who had managed to defeat the Gangas in around 760 CE. Varagunavarman I invaded the Pallava country, conquered the Kongu country (western Tamil Nadu) and Venadu (south Kerala). King Srimara Srivallabha (r. 815–62 CE) sailed to Sri Lanka, subjugated king Sena I, and sacked his capital Anuradhapura (the Panya invasion of Sri Lanka followed a period of vassalage). However, Srimara Srivallabha was soon overpowerd by Pallava king Nripatunga (r. 859–99 CE). Sena II, the king of Sri Lanka, invaded the Pandya country, sacked Madurai and chose Varagunavarman II (r. c. 862–880 CE) as the new king soon after. It is proposed that the start of the Kollam Era, the Kerala calendar, in 825 CE marked the liberation of Venadu from Pandya control.