After the invasion of the Portuguese, Konappu Bandara (King Vimaladharmasuriya) intelligently won the battle and became the first king of the kingdom of Kandy. He built The Temple of the Sacred Tooth Relic. The monarch ended with the death of the last king, Sri Vikrama Rajasinha in 1832.