In the late 17th century, Marthanda Varma who inherited the Kingdom of Venad expanded the kingdom by conquering the kingdoms of Attingal, Kollam, Kayamkulam, Kottarakara, Kottayam, Changanassery, Meenachil, Poonjar and Ambalapuzha. In 1729, Marthanda Varma founded the princely state of Thiruvithamkoor and Thiruvananthapuram was made the capital in 1745 after shifting the capital from Padmanabhapuram in Kanyakumari district. The kingdom of Travancore was dedicated by Marthanda Varma to the deity Sri. Padmanabha (Lord Vishnu). The rulers of Travancore ruled the kingdom as the servants of Sri. Padmanabha.