The history of Thiruvananthapuram dates back to the 18th century AD. In 1795, the city became the capital of the princely state of Travancore. Several historic landmarks of the city, including the Kowdiar Palace, University of Kerala, and Napier Museum were built during that period. After independence, Thiruvananthapuram was made the capital of the state of Kerala. Ancient and Medieval history According to legend,the site of Thiruvananthapuram was once a jungle known as Anantan Kādu, which was home to a Pulayar couple who cultivated rice. One day, the wife heard a baby crying as she was weeding. After a search, she found a child so beautiful that she assumed it was divine and was afraid to touch it. She fed the baby some milk and left it in the shade of a tree, whereupon a five headed cobra appeared, moved the baby to a hole in the tree and used its hood to shelter the child from the sun. Realizing it was an incarnation of the Hindu deity Vishnu, the Pulayar and his wife made offerings of milk and congee in a coconut shell. Once the king of Travancore heard of the baby, he issued orders for the construction of a temple at the location as Padmanabha swami temple. The ancient political and cultural history of the city was almost entirely independent from that of the rest of Kerala. The Chera dynasty governed the area of Malabar Coast between Alappuzha in the south to Kasaragod in the north. This included Palakkad Gap, Coimbatore, Salem, and Kolli Hills. The region around Coimbatore was ruled by the Cheras during Sangam period between c. 1st and the 4th centuries CE and it served as the eastern entrance to the Palakkad Gap, the principal trade route between the Malabar Coast and Tamil Nadu. However the southern region of the present-day Kerala state (The coastal belt between Thiruvananthapuram and Alappuzha) was under Ay dynasty, who was more related to the Pandya dynasty of Madurai. Present-day Thiruvananthapuram city, district, and Kanyakumari district, were parts of Ay dynasty during ancient and medieval ages, which was a Tamil kingdom based in the southernmost part of Indian Subcontinent. Ay kingdom had experienced attacks and conquests by Cholas and Pandyas in various periods. Later, it became a part of Venad in late middle ages, which was eventually expanded as the powerful kingdom of Travancore in the 18th century CE. The