This story is taken from the Mahabharata which is, along with the Ramayana,
one of the great epic poems of india. The good King Yudisthira had ruled the people of Pandava for many years and led them into a victorious but very long war against gigantic forces of evil. After his efforts, Yudisthira realized that he had already spent many years on earth and that it was time to leave for the kingdom of the Immortals. After finishing his plan, he headed for the great mountain to reach Heavenly City. His beautiful wife, Drapaudi, went with him, and his four brothers also accompanied him. At the very beginning of the path, a dog joined them, following them in silence.
But the journey to the mountain was long and arduous. Yudisthira’s four brothers were dying along the way, one by one, and after them the beautiful wife Drapaudi. The King was utterly alone except for the dog, who faithfully accompanied him through the long and arduous ascent to the Celestial City.
Finally the two, exhausted and weakened, arrived before the doors of the Firmament. Yudisthira bowed in humble reverence, asking for his acceptance.
Heaven and earth were filled with thunderous noise as God Indra, the God of a Thousand Eyes, arrived to receive the King in Paradise. But Yudisthira was not ready yet.
Without my brothers and my dear wife, my innocent Drapaudi, I do not wish to enter Heaven, O Lord of all deities.
“Fear not,” said Indra. “You’ll find them all in heaven. They’ve arrived before and they’re here!”
But Yudisthira still had a request to make.
– This dog accompanied me all the way here. It is devoted to me. For your faithfulness, I cannot enter without him! And besides, my heart has so much love to you.
Indra shook her huge head and the whole earth shook.
“Only you can have immortality,” he said, “and wealth and success and all the joy of heaven. You have accomplished this by undertaking the arduous journey.” But you cannot bring a dog into Heaven. Get rid of the dog, Yudisthira. It is no sin!
– But where will he go? And who will accompany you? He gave up all the pleasures of the earth to be my mate. I can’t leave him now.
God got angry at that and said firmly:
– You need to be pure to enter Paradise. A simple touch on a dog will eliminate all the merits of prayer. Reconsider what you want to do, Yudisthira. Let the dog go.
But Yudisthira insisted:
– O God of a Thousand Eyes, it is difficult for a person who has always tried to be fair to do something he considers unfair – even if it is to enter the Firmament. I do not want immortality if it is necessary to get rid of someone who is devoted to me.
Indra urged him once again:
“You left behind four brothers and the woman on the road. Why can’t you leave the dog too?
But Yudisthira replied:
“I left them only because they were dead and I could no longer help them or bring them back to life.” While they were alive, I did not abandon them.
“Are you willing to leave heaven then because of this dog?” Asked the God.
“Great God of all Gods,” Yudisthira said, “I have always kept my promise: never to abandon anyone who was afraid and came looking for me, who was distressed and helpless, or who was too weak to protect himself and still wanted to live.” I now add a fourth element. I promise not to abandon anyone who is devoted to me. And I will not abandon my friend.
Yudisthira bent down to pet the dog and was about to wander sadly from Heaven when suddenly, right before his eyes, a wonder occurred. The faithful dog has become Dharma, the God of Virtue and Justice.
“You are a good man, King Yudisthira.” You have shown faithfulness to the faithful and compassion for all creatures. You were able to do that by renouncing the Gods themselves instead of renouncing that humble dog that was your companion. You will be honored in heaven, O King Yudisthira, for there is no act which is higher and more richly rewarded than compassion for the humble.
Then Yudisthira entered the Heavenly City, with the God of Virtue beside her. And there he met his brothers and his dear wife again to enjoy eternal happiness. William J. Bennett The Book of Virtues New Frontier Publishers, 1995 (adaptation)