Hammira Mahakavya (IAST: Hammīra-Mahākāvya) is a 15th-century Indian Sanskrit epic poem written by the Jain scholar Nayachandra Suri. It is a legendary biography of the 13th century Chahamana king Hammira. While not entirely accurate from a historical point-of-view, the text provides valuable information about the medieval history of north-western India.
Much of the text describes Hammira's ancestry and his conquests of the neighbouring Hindu kingdoms. The last third part describes his conflict with Ala-ud-Din Khalji, the Sultan of Delhi. The text attributes Hammira's defeat against Ala-ud-Din to betrayal by his officers.

Authorship and date
Hammira Mahakavya was composed by the Jain scholar Nayachandra Suri. The author's grandfather and teacher Jayasiṃha Sūri was a poet and a scholar. Jayasiṃha knew six languages, and composed three works - Nyāya Sāraṭika, a Sanskrit grammar, and a poem on Kumāra Nṛpati. The author was not a contemporary of the text's hero Hammira. He was possibly a court poet of the Tomara ruler Vīrama, since he states that he wrote the text as a response to a challenge in Virama's court that no contemporary poet was capable of composing a kāvya comparable to the works composed by the ancient poets such as Kalidasa, Bilhana and others. Nayachandra also states that Hammira appeared in his dream urging him to compose Hammira-Mahākāvya.

The author states that Hammira appeared in his dream exactly 100 years after his death (which happened in 1301). This suggests that the composition of the poem must have began in 1401. However, the exact date and place of the text's origin are not certain. According to scholar Cynthia Talbot, it was probably composed around 1400 CE, possibly to please a Chauhan (Chahamana) ruler. Based on the assertion that the poem was written as a response to a challenge in Virama's court, Phyllis Granoff theorizes that the poem was written at the Tomara court, around 1420 CE.

Nayachandra's disciple Nayahamsa made a copy of the manuscript in 1496 CE, at "Sri Perojpur" (Firozpur, Punjab). This manuscript was used by N. J. Kirtane to produce an editio princeps. Nayahamsa also added an appendix, which praises Nayachandra Suri and his spiritual lineage. Nayahamsa had copied the manuscript at Firuzpur, a town whose modern location is uncertain. Kirtane received the manuscript from a person of Nashik, who had received it from someone else.
Content
The Hammīra-Mahākāvya consists of 1500 verses, divided into 14 sargas (cantos). The poem begins with an invocation to Hindu deities and Jain tirthankaras. The poet uses several words with double meanings that can refer to either a Hindu deity or a Jain tirthankara. E.g.:
"Nābhibhū" ("navel-born" or "progeny of Nabhi") can mean Brahma or the first tirthankara Rishabhanatha "Śrī Pārśva" can mean Vishnu or Parshvanatha "Śaṃkara Vīravibhu" can mean Shiva or Mahavira "Bhīsvān Śānti" can mean Surya (the sun) or Shantinatha "Samudra Janman" can refer to Soma (the moon) or Neminatha
The poem then describes the life Hammira, who is compared to the legendary heroes Mandhata, Yudhishthira and Rama.
Cantos 1-4 are devoted to Hammira's ancestors, including kings from the Shakambhari Chahamana dynasty. Cantos 5-7 describe Hammira's engagement in various services, sports and festivities. The information contained in this part is of little historical value. The next few cantos describe his reign. The last third part of the text describes Hammira's conflict with Ala-ud-Din Khalji, the Muslim Sultan of Delhi.
Hammira's ancestors
The text gives the following line of succession of the Chahamana kings, which does not match exactly with the historical genealogy of the dynasty:
Much of the information about these ancestors is fanciful in nature. For example, the dynasty's mythical progenitor Chahamana (or Chohan) is described as follows: Once Brahma wandered in search of a holy place for a sacrifice. The lotus held in has hand fell at a spot that later came to be known as Pushkar. Brahma decided to conduct a sacrifice at that place, and invoked Surya (the sun) to protect his sacrifice from the danavas (demons). A hero then sprung from the orb of the sun, and protected Brahma's sacrifice. With Brahma's blessings, this hero became a powerful king.
Even the description of Hammira's historical ancestors does not provide much information of historical value. For example, Chandraraja is described as follows:
The description of the events from the death of Prithviraja III to the reign of Hammira is fairly historical, but still not entirely accurate.





