There were several instances of foreign rule in ancient and medieval Sri Lanka .The Mahavamsa says that sometime after reign of Devanampiyatissa ( 250-210BC), two ‘damilas’ named Sena and Guttika, who were the sons of a freighter who brought horses to Sri Lanka , defeated king Suratissa and reigned together for twenty two years. Historians cannot establish the exact period of rule. The records give confusing dates. It is argued that Sena and Guttika could not have been from south India since south India did not trade in horses.

There were many invasions from south India. Rashtrakuta king Krisna III (939-966 AD) invaded Sri Lanka without success, in the time of Sinhala king Mahinda IV (956-972). The Rashtrakutas ruled in Karnataka between the 8th and 10th centuries. Several Tamil chiefs ruled over sections of the island in the early Anuradhapura period. Elara ruled over the principality of Anuradhapura until he was defeated by Dutugemunu in 161 BC. Elara’s origins are not known. He was from south India but he was not a ‘Chola prince’. The good deeds attributed to him, such as the story of the bell of justice are not unique to Elara. They are standard stories that appear elsewhere. They are found in the Persian legend of the mythical hero Anosharvan.

In 103 BC, seven Tamil chiefs landed at Mantota with a powerful force. The reigning king, Vattagamani Abhaya ran away since his forces were inadequate. The Tamil chiefs continued to rule until Vattagamani Abhaya finally got rid of them in 89 BC. Six Tamils ruled Sri Lanka in succession from 433 to 459 AD. Inscriptions assigned to them have been found at Kataragama and at Aragama, in Hiriyala hatpattu, Kurunegala district. Their rule was not welcome and local forces kept trying to eject them. Dhatusena took the throne away from them in 459 AD.

The longest period of foreign occupation was achieved by the Cholas. Nothing is known about the early history of the Cholas. The Cholas became prominent under the house of Vijayalaya (850-871) and held power from 850-1200. Nilakanta Sastri says this was the grandest epoch in the history of South India. The greatest Chola king was Rajaraja I (985-1016). He had a powerful army and navy. He defeated the Pandya, Chera, Rashtrakutas and western Chalukyas. The eastern Chalukya were controlled through marriage alliances. Rajendra I, son of Rajaraja married an eastern Chalukya. Kullotunga I, (1070-1122) took over the Chola kingdom, came from this line.

Rajaraja’s empire included territory from Godavari to Kerala. His army went up to the Ganges, through Orissa but could not hold the territory for long. He also conquered the Maldives. Rajaraja objected to Sri Vijaya’s strict control of the sea lanes on the route to China. He attacked Sri Vijaya in 1025. Kedah and Palembang were captured, and the king taken captive, but there was no permanent annexation of Sri Vijaya.

However, the Chola empire and its supremacy at sea did not last long. The Chola empire was continuously challenged by the other south Indian kingdoms. Rashtrakuta king Krisna III tried to wreck the empire ‘at birth’ in 950 AD. By the time of Kullotunga I, the Chola kingdom was under attack by the Western Chalukyas, the Keralas, and the Pandyas.

The Colas wanted to conquer the whole of Sri Lanka but were only able to rule over the Rajarata. .Cola king Parantaka I (907-955) invaded Sri Lanka during the time of Udaya IV (946-954) and took Anuradhapura, but could not hold it. The Sinhala king seems to have made a lightening raid to Tamil country in return. Parantaka II invaded, without success, in the time of Mahinda IV (956-972). Rajaraja I (985-1014) invaded, took Anuradhapura and chased the Sinhala king Mahinda V down to Ruhuna. . Rajendra I (1012-1044) completed the conquest. Mahinda V was captured and taken to India, where he died. The Colas occupied Rajarata from 1017-1070 AD.

Colas attacked Ruhuna on several occasions, but failed to take over the territory. They also failed in their attempt to capture prince Kassapa, the heir to the throne. Ruhuna and Malayadesa continued under the Sinhala king. The Sinhala princes who ruled in Ruhuna after Mahinda died, tried to dislodge the Colas. The Colas were expelled from Sri Lanka by Vijayabahu I (1055-1110). Chola king Kullotunga I (1070-1122) did not attempt to recapture Sri Lanka. there were several Cola invasions in the Polonnaruwa period.. Cola invasions took place during the time of Queen Kalyanavati (1202 -1208), Anikanda (1209), and Lokesvara (1210-1211.) There were three Cola invasions during time of Queen Lilavati (1197-1212). These were repulsed.

There is little or no information on Chola rule in Rajarata. . We do not know who ruled on behalf of the Cholas. Chola princes were appointed to rule Pandya and Kerala kingdoms, but there is no evidence of any such appointment for Sri Lanka or the appointment of a viceroy. We do not know whether the administrators who ruled over Rajarata were those of high rank or lesser rank.

The Sinhala population of Rajarata did not like Chola rule . They became restive and around 1065 they rebelled against the Colas. Cola king sent reinforcements from India to quell the rebellion. The Colas are said to have plundered and destroyed Buddhist institutions in Sri Lanka. W.M.K.Wijetunga says that ‘Cholas were exceptional in their ruthlessness and the passionate desire to posses the wealth of their enemies even if it came from the centers of religious worship." However, they gave benefactions to Velgam vihara near Gantale.

The Cholas seem to have focused on economic returns. There is extensive information on the land tax and the payment of produce as revenue. However, very few coins belonging to the Cholas have been found in Sri Lanka. These coins were discontinued once the Sinhala kings regained the Rajarata. Colas did not introduce any new administrative ideas. The records of Vijayabahu I and Parakrama bahu I show that they used the same administrative terms and institutions that were known before Chola rule. Wijetunga thinks that the Cholas continued the existing Sinhala system, and that locals were employed in subordinate positions. The administration of justice had been neglected. Vijayabahu restored the legal system and personally administered justice.

There was another occupation of the Rajarata from 1215 to 1232 by Magha of Kalinga, who came with Tamil and Kerala troops. Magha set up garrisons at Polonnaruwa, Kottiyar, Anuradhapura, Padaviya, Valikagama and Pulacccheri. The exact period of his rule is not certain. his rule ended either in 1247 or 1255. Sinhala rulers set up their own centers of power, at Minipe, Yapahuwa , Govindamala, and at a place about three miles east of present Maho. Magha was defeated in war by Parakrama bahu II (1236-1270)

There was one known invasion from south east Asia. Chandrabhanu, a Malay prince from the Buddhist kingdom of Ligor (now Nakon Sri Thammarat) arrived in Sri Lanka in 1247. His followers had landed at various seaports, probably in the south western seaboard. They fought with poisoned arrows. Chandrabhanu was defeated, but returned sometime between 1258 and 1262. He landed at Mantota with Malay and Tamil mercenaries. He ruled over a large area of the north, including the Jaffna peninsula. This resulted in place names such as Chavakachcheri .Chandrabhanu then attacked Yapahuwa in 1263. He was defeated by the Sinhala king with the assistance of the Pandyas.

From the ninth century onwards, Tamil kingdom was dominated by two rival dynasties, the Colas and the Pandyas. Power see-sawed between these two dynasties. Both dynasties attempted to bring Sri Lanka under their control. Unlike the Cholas, the Pandyas were unable to dislodge the Sinhala king. Various Pandyas came to Sri Lanka during the ancient and medieval period. Pandya king Srimara Sri Vallabha invaded the island during the reign of Sena I (833-853).Srimara was after loot. He plundered Anuradhapura, handed back the city to Sena and left. During the Chola occupation, Vikkrama Pandya ruled at Kalutara till he was killed by Jagatipala of Oudh (Ayodhya, north India) , who was also ruling in the south.

Pandyas were in power in the Tamil kingdom in the 13th century. They were at their peak. Jatavarman Sundara Pandya II (1253-1270), the best of the Pandya kings, ruled over the Chola and Chera territory, as well as a part of today’s Andhra Pradesh and Karnataka. Pandya rule was shared by several princes of the royal family, with one having primacy over the rest. Jatavarman Vira Pandya ruled together with Jatavarman Sundara Pandya.

The Pandyas invaded Sri Lanka .Parakrama Pandya was ruling in Polonnaruwa around 1215-1232. Jatavarman Vira Pandya invaded around 1258 and Jatavarman Sundara Pandya invaded around 1263. These invasions seem to have been short lived. The Pandyas helped the Sinhala king to chase away Chandrabhanu when he attacked the Sinhala king in 1263 but they made sure that Jaffna stayed under the control of the son of Chandrabhanu. In 1284 Pandya king Maravarman Kulasekhara (1268-1310) sent Ariyachakravarti to Sri Lanka. Ariyachakravarti returned with the tooth relic. Later, Parakrama bahu III (1287-1293) went to south India, spoke to the Pandya king and got back the tooth relic.

The Pandyans eventually succeeded in establishing a strong base in Jaffna. Around 1286, the Pandya kings installed Ariyachakravarti in Jaffna. Ariya chakravarti was probably a leader in the Pandyan army. Under Ariya chakravarti Jaffna became a part of the Pandya kingdom of south India. P.A.T. Gunasinghe pointed out that unlike most kings, Ariya chakravarti left no inscriptions. The tradition of leaving inscriptions was there at the time, and there is one relevant inscription in Kegalle, but none in Jaffna, indicating that this kingdom was not an independent one but was a part of the south Indian Pandya kingdom. It became according to Vernon Mendis "a Pandyan principality".

The area under Ariyachakravarti grew in size and by 1344 the pearl fisheries around Mannar were in his hands. Pandyans then tried to annexe the rest of the island using their Jaffna base. Aryachakravarti invaded from Jaffna, defeated Vikramabahu III (1359-74) who ruled from Gampola and exacted tribute. The territory conquered by Ariyachakravarti included Colombo, Negombo, Wattala and Chilaw. Rajavali states that Tamil agents were stationed at various places including seaports to collect the tribute.

This situation did not last long. Nissanka Alagakkonara, a powerful minister in Vickramabahu’s court, challenged the Jaffna king. According to the Rajavali, he did so by hanging the king’s tax collectors. Ariyachakravarti attacked by land and sea. He was defeated and pushed back into Jaffna. After Alagakkonara died, Aryachakravarti attacked again during the time of Buvanekabahu V (1374-1408) but was defeated. The tribute ended.

This period of Tamil control did not exceed 29 years. It was probably much less. Historians are definite that there was no territorial annexation of the Sinhala kingdom by Jaffna, though revenue was obtained. Historians think that the Pandyans were interested in gaining control of the rich cinnamon resources in the west of the island.

The next threat came from the Vijayangara kingdom of south India. In the fourteenth century, the Sagama kings led by Harihara I (1336-57) and Harihara II (1377-1404) created the Kannada speaking Vijayanagara empire with its capital at Vijayanagara (near Hampi). From 1336 to 1646 this Vijayangara empire controlled the whole of south India, including Kerala, Tamilnadu, Karnataka and Andhra Pradesh

The Tamil kingdom was also under Vijayanagara from 1366 to 1646. Telegus and Kannadas came into the Tamil kingdom to administer it. Jaffna which was under the Pandyas went under Vijayanagara. Jaffna was made to pay tribute and when it tried to rebel, prince Virupaksha of the Vijayangara Empire invaded and brought Jaffna under control. This is indicated in his inscription dated 1365. Jaffna stayed under Vijayanagara control until the Portuguese took it over.

The Vijayanagara kings attacked the Sinhala king twice and were defeated on both occasions. They were defeated in 1390 by Buvaneka bahu V and in 1432 by Parakrama bahu VI. According to Valentyn, writing in the 18th century, this gave the Sinhalese a formidable name in the east, for ‘humbling the Kannadi’ (Vijayanagara).

Foreign rule, which with the exception of Chandrabhanu, meant south Indian rule, was deeply resented in Sri Lanka. During the Chola occupation, there was ‘sullen opposition’ as well as revolt by the Sinhalese living in the Rajarata. The Sinhalese were not prepared to submit to foreign rule and no Tamil dynasty was allowed to take root.

Whenever Tamil kings or Tamil chiefs occupied Sri Lanka, the Sinhala royalty moved to some other part of the island and functioned from there. The Sinhala kings were very determined in this matter. Regardless of how long it took, they watched, waited and eventually pushed the Tamils and other invaders out. Dutugemunu eliminated Elara, Vattagamani Abhaya and Dhatusena got back their thrones, Vijayabahu I (1055-1110) expelled the Colas and Vijayabahu III (1232-1236) got rid of Magha.

Sri Lanka was never fully under a foreign power during the ancient or medical period. There was always a Sinhala king, ruling somewhere in the island, trying to get rid of the foreign invader. He functioned as the rallying point for the Sinhala population. In its long history, the island of Sri Lanka came completely under foreign rule only in the period 1815 to 1948, when it was under the British.