Malay invasions of Sri Lanka
Malayan invasions of Sri Lanka occurred in the mid-13th century, when the Malayan ruler Chandrabhanu Sridhamaraja of Tambralinga, invaded Sri Lanka twice during the reign of king Parakramabahu II of Dambadeniya. Both invasions were successfully repulsed by the Kingdom of Dambadeniya. Background 
The Rajarata civilization of Sri Lanka ended with the fall of Polonnaruwa to Kalinga Magha, a conqueror from the Eastern Ganga dynasty. Kalinga Magha's brutal reign in Polonnaruwa caused a massive human migration from the region of Rajarata to the South. Not long after, several political states emerged in the southern region, and the kingdom of Dambadeniya in Maya Rata was one of them. Parakramabahu II, who became the second monarch of Dambadeniya in 1236, was strengthening his army during the time to defeat and banish Magha from Sri Lanka. First Invasion 
While preparing for the battle with Kalinga Magha, Chandrabhanu, a Javaka or 'Malayan ruler' from the South-east Tambralinga kingdom (present-day Thailand) invaded Sri Lanka in 1244 all of a sudden, with a host armed with blow-pipes and poisoned arrows. He may have been a sea-pirate, and descended on the Island later on. It is unknown why Chandrabhanu actually wanted to invade the country, but it is most accepted that he invaded Sri Lanka with the aim of claiming the sacred tooth relic of the Buddha in Sri Lanka. To handle the unexpected Malayan an invasion, Prince Veerabahu, the nephew of Parakramabahu II was sent by force to oust Chandrabhanu. Second Invasion 
Chandrabhanu was defeated, but he was able to move North (present-day Jaffna) and secure the Tamil throne for several years. Not long after, he began setting up a plan to re-invade Dambadeniya. He declared himself as the king of Jaffna and adopted the regnal name 'Srīdḥarmarāja'. Chandrabhanu's reign in Jaffna gave the opportunity to the Pandya Empire to intervene with territorial control in the North, and thus the Pandya king Sadayavarman Sundara Pandyan invaded and Chandrabhanu had to submit to Pandya rule as a vassal. However, despite the invasions, he was able to spend his time in religious and pious works. According to contemporary records, he held a convocation to reform the Buddhist priesthood, and repaired and constructed Buddhist temples throughout the region. Due to these activities, this cunning king was soon able to win the hearts of the Sinhalese and Tamils living in the North. Taking advantage of this opportunity, King Chandrabhanu gathered a large army from the north and invaded Dambadeniya to capture the Tooth Relic. However, King Parakramabahu II mobilized an army in favor of Jatavarman Veera Pandyan, the emperor of the Pandyan kingdom and fought with Chandrabhanu. According to historical records, King Chandrabhanu was defeated and killed in the war. Aftermath 

After the death of Chandrabhanu, his son Savakanmaindan proclaimed himself as king of Jaffna in 1262. However, in 1277, the Pandyas under King Maravarman Kulasekara Pandyan I again invaded and defeated Savakanmaindan and installed one of their ministers, Kulasekara Cinkaiariyan, an Aryacakravarti as the King. Jaffna then existed as a tributary state to the Pandyas and received independence in 1323, after the Pandyan Empire was annexed by the Delhi Sultanate and later by the Vijayanagaras. It continued to exist as an independent dynastic kingdom until 1619. Meanwhile, in Southeast Asia, Tambralinga was annexed in the late-13th century by the emerging Ayutthaya Kingdom, with the region being renamed as Nakhon Si Thammarat. The area would stay under Thai influence for centuries after this conquest, being a province of the succeeding Rattanakosin Kingdom and modernized Kingdom of Thailand. See also 

 Sri Lankan Malays
 Savakanmaindan
 Relic of the tooth of the Buddha

References 

 History of Sri Lankan Malays
 History of Indonesian kingdoms
 Magha the Tyrant - Polonnaruwa (1215 - 1255)
 Codrington's Short History of Ceylon - Chapter V

13th century in Sri Lanka
Wars involving Sri Lanka
Kingdom of Dambadeniya
Military history of Sri Lanka