According to legend, Madurai got its name from the madhuram (nectar) that fell from Shiva's locks on this place.Madurai was taken over by the Chola emperors in the 10th century AD. The Pandyas regained control in the 12th century AD, only to loose it again to the invaders under Malik Kafur, in the service of the Delhi Sultanate. Malik Kafur established his own dynasty until 1364, when it was overthrown by the Vijayanagar kings of Hampi.
In 1565, after the fall of the Vijayanagar kingdom, the Nayaks, who were the local governors of Madurai, took over. They ruled until 1781, and in this period, Madurai reached its cultural zenith. They laid out the old town on in the pattern of a lotus with narrow streets surrounding the Meenakshi Temple at the center. The streets around the temple were named after the major festivals. The reign under the Tirumalai Nayak was the most prosperous period of Madurai. He built the gopurams (domes surmounting the gateway) of the Meenakshi temple, and under his rule, Madurai became the cultural center for the Tamil people.
The 60-year interval between the end of the Nayak dynasty and the secession of Madurai to the British is a chequered period. It passed through a series of rulers and influences until the British East India Company finally took it over in 1801. In 1840, the company razed the fort that had previously surrounded the city and filled it with moat. They constructed four broad streets-the Veli streets-on the top of this fill defining the limits of the old city.