A combination of political and military moves gained the Portuguese control over most of the island, but their invasion of the final independent kingdom was a disaster, leading to a stalemate in the wider war and a truce from 1621.
In 1638 the war restarted when the Dutch East India Company intervened in the conflict, initially as an ally of the Sinhalese against the Portuguese, but later as an enemy of both sides.
Seeking to subdue the last major kingdom in Sri Lanka, the Portuguese launched a military invasion of Kandy in the Campaign of Danture of 1594.
The uneasy peace was eventually broken by the intervention of the Dutch East India Company in 1638, who sought to exploit the situation to take over Portuguese possessions as part of the Dutch–Portuguese War.
[9] Island resources, Sri Lanka's strategic location for both trade and naval security and rise of the Mughal Empire in India influenced this change.
[10][note 1] In 1518, the Governor of Portuguese India (Lopo Soares de Albergaria) obtained authorization from King Parakramabahu VIII of Kotte to build a trading post in Colombo, protected by a palisade and a wall of rammed earth, to be erected at the edge of the port.
[12] The construction site was attacked by Sinhalese, armed with bows and a few cannons – originally offered by the Muslim merchants to Parakramabahu – but the mob was dispersed by the much more powerful bombardment of the Portuguese ships anchored in the harbour.
A truce was negotiated between Sitawaka and Kotte in the aftermath of the conflict, and Mayadunne turned his attention south to the kingdom of Raigama, which he annexed following the death of Raigam Bandara (Pararajasinha) in 1538.
News in 1543 that Bhuvanekabahu had named his grandson Dharmapala as his successor prompted a fifth invasion, yet again repulsed with the aid Portuguese forces under the command of the new captain-General, António Barreto.
Strategically, this enabled them to harass and wage attritionary campaigns against the kingdom, the most notable being the invasion of 1574 which saw Negombo, Kalutara and Beruwala plundered, Sitawakan garrisons at Nagalagama and Mapane expelled, and the districts of Weligama and Chilaw ravaged.
The Sinhalese army appeared around Colombo on 4 June, consisting of 50,000 men, 2200 pack elephants, 40,000 oxen, and 150 small calibre bronze cannon.
The Portuguese flotilla of 6 galleys was beached due to the weather, but nevertheless Brito sent a small craft over the sea to Goa with a distress call.
With the digging complete, Rajasinha rallied his entire army outside Colombo in a display of force, shouting war-cries to intimidate the besieged.
Finally, on 18 February a large fleet of eighteen galleys commanded by Manuel de Sousa Coutinho arrived, after raiding Sitawakan shores in northwestern Sri Lanka.
The fleet sailed in battle formation and sounded its guns; the Portuguese defenders greeted it by ringing their church bells and firing a general salvo from the fortress' cannon.
In 1591 a Portuguese expedition deposed and killed the Jaffna king Puviraja Pandaram, then installed his son Ethirimana Cinkam as a client ruler.
Less than a thousand native allies were left with the Portuguese forces, who were now massively outnumbered, lacking supplies, and faced a mass rebellion.
The original military system of castes and levies however, remained organized under the local mudaliar commanders, who assisted the Portuguese troops.
[32] The taxes imposed by the Portuguese, and the desecration of Buddhist temples by missionaries caused great discontent among the Sinhalese peasantry and in late 1616 an uprising broke out in Sabaragamuwa.
Fearing a future rival, he withdrew all his aid and ordered Kuruvita Rala to suspend operations while he attempted to gain a truce with the Portuguese.
[34] Kuruvita Rala, ruling much of southern Sri Lanka including the port of Batticaloa, now posed a much graver threat to Senarat than Nikapitiya.
In negotiating with the Portuguese, Senarat proved rather capable, refusing most of Portuguese demands but still had to formally pledge vassalage to the King of Portugal, agree not interfere in missionary work in Kandy (Senarat even entrusted his children to be educated by Franciscans), offer several noblemen as hostages in Colombo and pay two large elephants a year as a token tribute.
Between July and September the Portuguese were able to recapture the Seven Korales, and Nikapitiya fled to the jungles inhabited by the Vanni in northeastern Sri Lanka, never to be seen again.
Furthermore, the captain-general had received reports that a Christian Malabarese privateer on the service of the Zamorin, Dom Pedro Rodrigues, was attacking Portuguese and allied shipping in the vicinity of the island of Mannar, and tasked Oliveira to deal with the issue en route.
[42] A month later, Kuruvita Rala was himself ambushed and killed by the disava[check spelling] of Matara Dom Costantino Barreto (a Christian Sinhalese) in Panama, southeastern Sri Lanka.
Arriving in January 1619 as the first Danish representative, Roland Crappé raided Portuguese-held Jaffna and Nagapattinam, though he was defeated in a naval battle off the coast of Karaikal.
[44][45] In 1620, Senarat received an expedition of the Danish East India Company led by Ove Gjedde, who reached Sri Lanka after a perilous journey of over two years, that claimed more than half its personnel.
Senarat was hopeful for a Danish alliance against the Portuguese; he agreed to sign a treaty and grant them the port of Trincomalee, where the great Koneswaram temple was located.
However the Kandyans became suspicious of their new allies, correctly believing that the VOC goal was not just to remove the Portuguese from Sri Lanka, but to replace them as the colonial power.
They continued to resist European influence on Sri Lanka, engaging in skirmishing and guerilla warfare without making significant inroads into the lowlands.