The Pandya dynasty, also referred to as the Pandyas of Madurai, was an ancient dynasty of South India, and among the three great kingdoms of Tamilakam, the other two being the Cholas and the Cheras. Existing since at least the 4th to 3rd centuries BCE, the dynasty passed through two periods of imperial dominance, the 6th to 10th centuries CE, and under the 'Later Pandyas' (13th to 14th centuries CE). The Pandyas ruled extensive territories, at times including regions of present-day South India and northern Sri Lanka through vassal states subject to Madurai.
The rulers of the three Tamil dynasties were referred to as the "three crowned rulers (the mu-ventar) of the Tamil country". The origin and the timeline of the Pandya dynasty are difficult to establish. The early Pandya chieftains ruled their country (Pandya Nadu) from the ancient period, which included the inland city of Madurai and the southern port of Korkai. The Pandyas are celebrated in the earliest available Tamil poetry (Sangam literature"). Graeco-Roman accounts (as early as 4th century BCE), the edicts of Maurya emperor Ashoka, coins with legends in Tamil-Brahmi script, and Tamil-Brahmi inscriptions suggest the continuity of the Pandya dynasty from the 3rd century BCE to the early centuries CE. The early historic Pandyas faded into obscurity upon the rise of the Kalabhra dynasty in south India.
From the 6th century to the 9th century CE, the Chalukyas of Badami or Rashtrakutas of the Deccan, the Pallavas of Kanchi, and Pandyas of Madurai dominated the politics of south India. The Pandyas often ruled or invaded the fertile estuary of Kaveri (the Chola country), the ancient Chera country (Kongu and central Kerala) and Venadu (southern Kerala), the Pallava country and Sri Lanka. The Pandyas fell into decline with the rise of the Cholas of Thanjavur in the 9th century and were in constant conflict with the latter. The Pandyas allied themselves with the Sinhalese and the Cheras in harassing the Chola Empire until it found an opportunity for reviving its frontiers during the late 13th century.
The Pandyas entered their golden age under Maravarman I and Jatavarman Sundara Pandya I (13th century). Some early efforts by Maravarman I to expand into the ancient Chola country were effectively checked by the Hoysalas. Jatavarman I (c. 1251) successfully expanded the kingdom into the Telugu country (as far north as Nellore), south Kerala, and conquered northern Sri Lanka. The city of Kanchi became a secondary capital of the Pandyas.The Hoysalas, in general, were confined to Mysore Plateau and even king Somesvara was killed in a battle with Pandyas. Maravarman Kulasekhara I (1268) defeated an alliance of the Hoysalas and the Cholas (1279) and invaded Sri Lanka. The venerable Tooth Relic of the Buddha was carried away by the Pandyas. During this period, the rule of the kingdom was shared among several royals, one of them enjoying primacy over the rest. An internal crisis in the Pandya kingdom coincided with the Khalji invasion of south India in 1310–11. The ensuing political crisis saw more sultanate raids and plunder, the loss of south Kerala (1312), and north Sri Lanka (1323) and the establishment of the Madurai sultanate (1334). The Pandyas of Ucchangi (9th–13th century), in the Tungabhadra Valley were related to the Pandyas of Madurai.
According to tradition, the legendary Sangams ("the Academies") were held in Madurai under the patronage of the Pandyas, and some of the Pandya rulers claimed to be poets themselves. Pandya Nadu was home to a number of renowned temples, including the Meenakshi Temple in Madurai. The revival of the Pandya power by Kadungon (7th century CE) coincided with the prominence of the Shaivite nayanars and the Vaishnavite alvars. It is known that the Pandya rulers followed Jainism for a short period of time in history.