The Nayaks of Kandy (also referred to as the Kandyan Nayak Dynasty, Sinhala: මහනුවර නායක්කාරවරු Mahanuwara Nayakkarawaru, Tamil: கண்டி நாயக்கர்) were the rulers of the Kingdom of Kandy between 1739 and 1815, and the last dynasty to rule on the island. The term Nayak is derived from the Sanskrit word Nāyaka (meaning "leader, governor"). Their rise to power came about as a result of the death of Vira Narendrasinha, who left no legitimate heir- the throne passed to his brother-in-law, who was crowned as Sri Vijaya Rajasinha in 1739. They were of Telugu origin, spoke Telugu and Tamil, and used Sinhala and Tamil as their court languages. They are also credited for building various Vishnu temples in Sri Lanka dedicated to their clan deity Vishnu, known as Upulvan in Sinhala. A prominent one of t