Malayadhvaja Pandya

Malayadhvaja Pandya (மலயத்வஜ பாண்டியன்), also known as Sharangadhvaja Pandya, is a legendary king of Madurai and ruler of the Pandya Empire. He is mentioned in the Hindu epic Mahabharata. His queen consort is Kanchanamalai. He is the father of the goddess and queen of Madurai, Meenakshi.

Legend
According to a legend found in the Tamil text Tiruvilaiyadal Puranam, the childless Malayadhvaja Pandya and his wife perform ninety-nine ashvamedha yajnas to propitiate the gods, seeking a son for the succession. However, a three-year-old girl emerged from the yajna fire, bearing three breasts, upon the lap of the queen. A heavenly voice stated that the royal couple should treat her like a son, and that she would lose the third middle breast when she met her future husband. The girl is named Taḍātakai, and subsequently raised as Malayadhvaja Pandya's male heir, trained in archery and horseriding. The king names her as his successor before his death. She is renamed Meenakshi by Sage Agastya during her ascension of the throne. She has her minister, named Sumati, to assemble a large army, and conquers the realms of neighbouring kingdoms, hoping to come across her destined husband. After defeating Indra, she marshals her forces against Kailasha, the abode of Shiva. Upon meeting the deity, Meenakshi's third breast fell, and she recognised him as her groom. Returning to Madurai, Meenakshi married Shiva, who adopted the title of Sundara Pandya, with Vishnu offering her hand in marriage.

Mahabharata
King Malayadhvaja appears in the Mahabharata. His father, Kulashekara Pandya, is portrayed as slain by Krishna and his country invaded. To avenge his father's death, Prince Malayadhvaja obtains weapons from Bhishma, Drona, Balarama, and Kripa. In valour, Prince Malayadhvaja is said to be mighty warrior whose valor is nothing lesser than Bhishma, Drona and Karna. He then desired to destroy the city of Dvaraka, Krishna's capital, and to subjugate the whole world. Sage Agastya and Varuna, however, counselled him against that decision and granted him his father's kingdom and made him king. He was present during the svayamvara of Draupadi and brought jars of sandalwood and agarwood perfumes and jars of gold for Yudhishthira's rajasuya. During the Kurukshetra War, he sided with the Pandavas and is mentioned as a powerful charioteer and warrior. On 16th Day, when Ashwatthama was about to kill Arjuna, Malayadhvaja Pandya defends Arjuna and engaged in a combat with Ashwatthama. After the fierce battle, Malayadhvaja Pandya was killed by Ashwatthama and people hailed Malayadhvaja Pandya's brave death.

Bhagavata Purana
Malayadhvaja Pandya is described to be a sage-king and a "conqueror of cities" in the Bhagavata Purana. He takes Vaidarbhi, the daughter of the king of Vidarbha, as his wife, and performs austerites seeking to propitiate Krishna upon the Kulachala mountains. After a century of such practices, he is described to have gained divine wisdom from Vishnu himself and renounced the world.