The details of the Pandyan civil war can be best sourced from the Mahavamsa which is a non-canonical text written in Pali about the kings of Sri Lanka. According to the texts, the Pandyan kingdom was ruled by Parakrama Pandya I with his capital at Madurai. His contemporary and rival Kulashekhara Pandya wished to claim the Pandyan throne for himself. He was a subordinate of the Cholas and thus had their support with him. He attacked Parakrama Pandya I and as a result the Pandyan civil war started.
After being surrounded by the enemy, Parakrama Pandya I sought assistance from the Sri Lankan king Parakramabahu I. On the other hand Kulashekhara Pandya was supported by the Chola emperor Rajadhiraja Chola II.
Kulashekhara Pandya killed Parakrama Pandya I’s wife and children and ascended the throne before the Ceylonese king Parakramabahu I could send help. However Vira Pandya, the son of Parakrama Pandya I managed to escape. He took the place of his father to fight against Kulashekhara Pandya. The Sri Lankan king Parakramabahu I instructed his general Lankapura Dandanatha to fight on behalf of Vira Pandya and install him on the Pandyan throne. However rather than heading for Madurai, Lankapura Dandanatha landed at Rameshwaram and captured the city which remained in the Sri Lankan hands for the next thirty years. A fortress called Parakramapura was built at this place. He along with Vira Pandya tried to fight with Kualshekhara Pandya during the early phase of the war. However he had the support of the Cholas and he fought fiercely with Rajadhiraja Chola II sending a powerful force led by Pallavarayar for his aid.
The Chola army fought two battles with the Sri Lankan forces at Kilenilaya and Ponnamaravathi. Lankapura won both battles, laid seize on Kulashekhara in Madurai and seized the city. Vira Pandya was restored to power but only as a puppet. After this, Lankapura fought another battle in the Chola territory and invaded Tondi and Pasi.
The Chola king Rajadhiraja Chola II prepared a plan to kill Lankapura along with other commanders of the Sri Lankan army and sent a force under his commander Thiruchitrambalamudaiyan Perumanambi to eliminate the Sri Lankans and install Kulashekhara Pandya on the throne. Perumanambi conquered the Pandyan kingdom and installed Kukashekhara Pandya as the king with full Chola Protection to him. According to the Pallavarayanpettai inscription, Lankapura was defeated in 1171 CE and his head was nailed to the gates of Madurai by Rajadhiraja Chola II. Hearing this news, Parakramabahu I prepared for another invasion of the Chola kingdom. However on getting the news, Rajadhiraja Chola II sent an army commanded by Annan Pallavarayan to launch a surprise attack. He invaded Sri Lanka and destroyed Parakramabahu’s preparations for war.
After destroying the preparations, the Cholas provided support to Sri Vallabha who was the nephew of Parakramabahu I and a rival claimant to the Sri Lankan throne. Parakramabahu I took a reverse step and requested Kulashekhara Pandya in invading the Chola kingdom. In lieu he offered him costly gifts. Kulashekhara Pandya invaded the Chola kingdom but he was defeated and driven out. The Chola forces then invaded the Pandya kingdom and installed Vira Pandya on the throne after deposing Kulashekahara Pandya.
Later the civil war merged with the Pandyan war fought between the two brothers, Vira Pandya and Vikrama Pandya which also involved the Chola king Kulothunga Chola III.