The Mahabharata contains Vidura’s elaboration of what
constitutes dharma. Vidura was well-versed in all aspects of
dharma because he was the god of justice — Yama — reborn.And there was a reason for Yama to be born as Vidura, saidRama Dikshitar in a discourse.
There used to be a sage called Mandavya, who was
steeped in severe penance and who had taken a vow of
silence. While Mandavya was engaged in penance, some
thieves ran into his hermitage.They were followed by the king’s soldiers, who arrested the thieves. The soldiers questioned Mandavya, but the sage did not answer because of his vow of silence. So they arrested him as well.
The king had the thieves and the sage impaled on spikes.
The thieves died, but Mandavya did not. The king wondered why. The sage told him what had happened. The king then apologised and ordered the sage to be released.
However, the spike could not be pulled out completely. So,
the king cut of the ends and the sage walked about with the
spike protruding from his body. He came to be called
Animandavya — the one with a stake in him. Mandavya wanted to know why this had happened to him and he went to Yamaloka. Yama told him that he had once hurt a fly and hence he had sufered. The sage said that he had hurt the fly as a child, but since then he had not sinned even once.
How then could Yama have given him so harsh a sentence?
He therefore cursed Yama to be born on earth. Yama took birth as Vidura and that was why Vidura was so well-versed in dharma.