Near the end of the Mahabharata, after the Pandavas and Draupadi undertake their final journey toward the Himalayas, Yudhishthira alone reaches the gates of heaven still alive, accompanied only by a dog that had faithfully followed him the entire way.
A companion who asked for nothing
Throughout the difficult final climb, during which each of his brothers and Draupadi fell and died one by one, Yudhishthira continued forward accompanied by a stray dog that had attached itself to the group, offering nothing but its loyal, silent presence.
A condition presented at the threshold
When Yudhishthira finally reached heaven’s gate, Indra welcomed him but stated that the dog could not enter – heaven, he explained, had no place for animals, and Yudhishthira would need to leave it behind to proceed.
A refusal that was itself the final test
Yudhishthira refused outright, declaring that he could not abandon a being who had shown him nothing but devoted loyalty, even if it meant forfeiting heaven himself. The moment turned out to be the last test of his dharma: the dog was revealed to be Yama, the god of death, in disguise, testing whether Yudhishthira’s commitment to righteousness held even when no one would blame him for a small, practical betrayal. Having passed, Yudhishthira was permitted to enter heaven in his own physical body, one of the only mortals in the tradition granted that distinction.