Kandy rose to power during the 15th century in Sri Lanka. The Kandyans had long evaded having to surrender to the Colonial powers in neighboring kingdoms. For a century and a half they rejected the Portuguese who barbarically destroyed parts of their city, but never managed to take significant hold. The Kandyans had local knowledge of the jungles and malaria – this was a great obstacle to uninvited visitors. But in the early 19th century, the British took advantage of domestic turmoil in Kandy, it was then that they ultimately faced their end. In 1815, an agreement was reached that ousted the Kandyan tyrant king from the throne. At this point, the kingdom lost its sovereignty, but the agreement also allowed Kandyan chiefs to keep many of their privileges.