Kingdom of Kandy (Sinhala: මහනුවර රාජධානිය) was an independent monarchy of the island of Lanka, located in the central and eastern portion of the island. It was founded in late 15th century and endured until the early 19th century. Initially a client kingdom of the Kingdom of Kotte, Kandy gradually established itself as an independent force during the tumultuous 16th and 17th centuries, allying at various times with the Jaffna Kingdom, the Madurai Nayak Dynasty[4] of South India, Sitawaka, the Portuguese and the Dutch to ensure its survival. From the 1590s, it was the sole independent native polity on the island of Sri Lanka, and through a combination of hit-and-run tactics and diplomacy kept European colonial forces – in particular the British – at bay, before finally succumbing to the third and last colonial ruler in 1818. The kingdom was absorbed into the British Empire as a protectorate following the Kandyan Convention of 1815, and definitively lost its autonomy following the Uva Rebellion of 1817.
The city of Senkadagalapura may have been founded as early as the mid-14th century during the reign of Vikramabâhu III of Gampola (1357–1374). Central Sri Lanka was ruled by the kings of Kotte from the early 15th to late 16th centuries; with Kotte's weakening in the face of Portuguese influence the area developed into an autonomous domain with Senkadagalapura at its capital. Following the Spoiling of Vijayabahu in 1521, and the subsequent partition of the kingdom of Kotte, Kandy asserted its independence and emerged as a serious rival to the eastern and southern kingdoms.
According to the Kandyan administrative system, the king was head of all spheres. He was also known as "Lankeshwara Thrisinhaladheeshwara". It was accepted that the king owned all lands and therefore was known as "Bhupathi". Even though the king was called "Adeeshwara", he had to rule according to the advice of the Buddhist priests and chieftains. The king had to follow the customs and traditions which were in popular practice at that time, otherwise the people would rebel against him if he did not. Not obeying these would be detrimental to the power of the king, an example being Vikrama Rajasinha, who had to surrender to the British, merely because he ignored the advice of the Buddhist priests and chieftains and did not follow the age old traditions.
The kings of Kandy became the rulers of the whole island with Vimaladharmasuriya I.