Tamil and Greek documents record the existence of Madurai from the 4th century BC. It was popular for trade, especially in spices, and was also the home of the sangam, the academy of Tamil poets. Over the centuries Madurai has come under the jurisdiction of the Cholas, the Pandyas, Muslim invaders, the Hindu Vijayanagar kings, and the Nayaks, who ruled until 1781. During the reign of Tirumalai Nayak (1623–55), the bulk of the Sri Meenakshi Temple was built, and Madurai became the cultural centre of the Tamil people, playing an important role in the development of the Tamil language.
Madurai then passed into the hands of the British East India Company. In 1840 the company razed the fort, which had previously surrounded the city, and filled in the moat. Four broad streets – the Veli streets – were constructed on top of this fill and to this day define the limits of the old city.