of Kandy in the Campaign of Danture of 1594. The invasion was a disaster for the Portuguese, with their entire army wiped out by Kandyan forces. The war became a stalemate, with further Portuguese attempts to conquer Kandy repeatedly repulsed, whilst the Kandyans were unable to oust the Portuguese from the rest of the island. A series of rebellions in both Portuguese held territory and the Kandyan Kingdom led both sides to agree to a truce in 1621. The treaty led to Kandy formally becoming a vassal state of Portugal, but in reality maintaining its independence. This allowed both sides to crush the rebellions in their respective territories, and ended direct conflict between them for the next seventeen years. The Portuguese were also able to conquer the Vanni chieftains in 1621. 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. The Dutch formed an alliance with Kandy; together they won several battles against the Portuguese, most notably the siege of Galle in 1640. However, the Dutch-Kandyan alliance broke down and the three remaining powers fought each other in triangular warfare for a time. The Dutch and Kandyans renewed their alliance in 1649 to drive the Portuguese from the island. The Portuguese stronghold at Colombo was conquered in 1656, but once this was done the Dutch immediately betrayed their Kandayn allies, taking over the Portuguese possessions. By the end of the war in 1658 all Portuguese forces had been expelled from the island. The Kingdom of Kandy was the only surviving indigenous polity, ruling almost half of Sri Lanka. The Dutch were left in control of the major population centres. Background The Portuguese arrived in Sri Lanka in 1505 and established trade relations with the Kotte kingdom. During the early 16th century their intentions were directed towards defending their trading interests, particularly the lucrative spice trade. However, with time this policy gradually changed to territorial ambitions with the objective of outright conquest. Island resources, Sri Lanka's strategic location for both trade and naval security and rise of the Mughal Empire in India influenced this change. Early stages (1518–1521) 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