After the Mahabharata war, the Pandavas ruled for thirty-six years. Then, they learnt that Sri Krishna had left his mortal body. They were overcome by grief and decided to give up kingship. They made Arjuna’s grandson, Parikshit, the king of Hastinapur. They themselves decided to retire to the Himalayas on the mahaprasthana—the great journey. This was a form of sanyasa in which a person journeyed towards the Himalayas. It was believed that heaven was on top of Mount Meru, which lay to the north of the Himalayas. The gods lived there. Nobody could reach it in their mortal body. Those undertaking mahaprasthana would give up food and water and keep walking northwards, thinking of God, until their bodies failed. In this way, they hoped to reach heaven.
The Pandavas too clad themselves in tree bark and set out on this journey. A dog started following them. They crossed the mighty peaks of the Himalayas and saw Mount Meru in front of them. There was snow all around. They were hungry and tired, but they kept walking. One day, Draupadi fell down and died instantly. Bhima told Yudhishthira, who was leading the group, that the queen had died. Yudhishthira shed tears but did not turn back. He told Bhima that they had to keep walking. They continued, and one by one, Sahadeva, Nakula, Arjuna and Bhima too fell and died. Yudhishthira shed tears and kept walking, followed by the faithful dog. Together, they continued upwards until they began to hear the bells of heaven.
The gods showered flowers on Yudhishthira. A chariot descended. Standing in it was Indra, the king of the gods. He said to Yudhishthira, ‘You are the greatest of mortals! You have been granted the privilege of reaching heaven in your own body. Please ascend this chariot.’ Yudhishthira refused to go to heaven without his brothers and Draupadi. Indra told him that they had already gone there. Yudhishthira agreed. He turned around, looked at the dog and said, ‘Get into the chariot, child.’ Indra was aghast. He said, ‘You want to take this dog along to heaven? No way! You must leave him behind.’ Yudhishthira said, ‘He has been my faithful companion through hunger and cold. He did not leave me even when my brothers and wife left me. I cannot leave him behind, even for the sake of heaven.’ Indra said, ‘There is no place in heaven for dogs.’ Yudhishthira said, ‘If the dog can’t go, I won’t go to heaven either.’ Indra said, ‘If you exchange your virtues with him, he can go to heaven in your place.’ Yudhishthira immediately agreed. At this, the dog revealed himself to be Dharma and told Yudhishthira that this had been his final test and that he had passed it.