The Mahābhārata is one of the two major Sanskrit epics of ancient India, the other being the Rāmāyaṇa. It narrates the struggle between two groups of cousins in the Kurukshetra War and the fates of the Kaurava and the Pāṇḍava princes and their successors.
It also contains philosophical and devotional material, such as a discussion of the four "goals of life" or puruṣārtha (12.161). Traditionally, the authorship of the Mahābhārata is attributed to Vyāsa. There have been many attempts to unravel its historical growth and compositional layers.
The Mahābhārata is the longest epic poem known and has been described as "the longest poem ever written". Its longest version consists of over 100,000 śloka or over 200,000 individual verse lines (each shloka is a couplet), and long prose passages. At about 1.8 million words in total, the Mahābhārata is roughly ten times the length of the Iliad and the Odyssey combined, or about four times the length of the Rāmāyaṇa. W. J. Johnson has compared the importance of the Mahābhārata in the context of world civilization to that of the Bible, the Quran, the works of Homer, Greek drama, or the works of William Shakespeare. Within the Indian tradition it is sometimes called the fifth Veda.
The historicity of the Kurukshetra War is unclear. Many historians estimate the date of the Kurukshetra war to Iron Age India of the 10th century BCE. The setting of the epic has a historical precedent in Iron Age (Vedic) India, where the Kuru kingdom was the center of political power during roughly 1200 to 800 BCE.