No less than eighteen rebellions took place during the reign of Muhammad bin Tughlaq, the second ruler of the Tughlaq dynasty of the Delhi Sultanate. One such rebellion challenging his authority came from Jalal-ud-din Ahsan Shah, governor of Malabar, who cashing on the Sultan's military preoccupations in Northern India, declared his independence in A.D. 1335 and struck gold and silver coins in his own name.
Thus came into being the independent Muslim Sultanate of Madurai which however proved short-lived. The kingdom was annexed to the resurgent Hindu kingdom of Vijayanagar in 1378. The victory has been celebrated in the Sanskrit epic poem of great merit Madura Vijayam (The conquest of Madurai) or Kamparaya-Charitam (History of Kampanna), composed by Ganga Devi, queen of VIra Kampanna, who led the Vijayanagar army.