Tirunelveli was under the rule of Pandya kings as their secondary capital; Madurai was the empire's primary capital. The Pandya dynasty in the region dates to several centuries before the Christian era from inscriptions by Ashoka (304–232 BCE) and mention in the "Mahavamsa", the "Brihat-Samhita" and the writings of Megasthenes (350–290 CE). The province came under the rule of Cholas under Rajendra Chola I in 1064 CE; however, it is unclear whether he conquered the region or obtained it voluntarily. Tirunelveli remained under the control of the Cholas until the early 13th century, when the second Pandyan empire was established with Madurai as its capital.