The Mahabharata (Sanskrit Mahābhārata महाभारत, IPA: [məɦaːˈbʱaːrət̪ə]) is one of the two major Sanskrit epics of ancient India, the other being the Ramayana. The epic is part of itihasa.
Besides its epic narrative of the Kurukshetra War and the fates of the Kauravas and the Pandavas, the Mahabharata contains much philosophical and devotional material, such as a discussion of the four "goals of life" or purusharthas (12.161). The latter are enumerated as dharma (right action), artha (purpose), kama (pleasure), and moksha (liberation). Among the principal works and stories that are a part of the Mahabharata are the Bhagavad Gita, the story of Damayanti, an abbreviated version of the Ramayana, and the Rishyasringa, often considered as works in their own right.
Traditionally, the authorship of the Mahabharata is attributed to Vyasa. There have been many attempts to unravel its historical growth and compositional layers. The oldest preserved parts of the text are not thought to be appreciably older than around 400 BCE, though the origins of the story probably fall between the 8th and 9th centuries BCE. The text probably reached its final form by the early Gupta period (ca. fourth century CE). The title may be translated as "the great tale of the Bhārata dynasty". According to the Mahabharata itself, the tale is extended from a shorter version of 24,000 verses called simply Bhārata.