Mahabharata, the largest of the Hindu epics, was composed by
Veda Vyasa in Sanskrit. The great poet dictated the verses to Lord Ganesh. It contains about 100,000
mantras (spells). Mahabharata has references about Ramayana, so it is assumed to have been written later than Ramayana.
Mahabharata depicts the great epic battle fought between Pandavas, the five sons of King
Pandu, and Kauravas, the 100 sons of King
Dhritarashtra. Duryodhana was the leader of Kauravas and
Yudhishtira, the leader of Pandavas. The war was fought on the fields of Kurukshetra.
Just as the Kurukshetra war began, Arjuna, a great warrior among the Pandavas, lost his nerves on seeing his own kith and kin arrayed on the enemy side. He refused to fight. Lord Krishna, his friend and charioteer, addressed him as they stood in between the two armies. This passage is the celebrated Bhagavad Gita, a guide to firm and resolute action. Krishna manifested his divinity before Arjuna. On freeing himself of all the apprehensions, Arjuna agreed to perform his dharma (duty). He then lead the troops into battle. Kauravas were defeated and the Pandavas ascended the throne of Hastina Puri.
After ruling the Hastina Puri for many years the five brothers accompanied by Draupadi started for Himalayas leaving the kingdom and all luxuries. A dog also accompanied them. On the way everyone fell down dead except Yudhisthira and the dog. At the doors of heaven Indra, the lord of heaven, appeared before Yudhisthira and welcomed him to the kingdom of heavens. Indra refused to admit the dog into heaven. But Yudhisthira was not ready to enter the heaven leaving the dog behind. On listening to Yudhisthira’s words Lord Dharma emerged from the dog's form and blessed him. He was admitted to heaven.