As Dharmaraja, the king of righteousness, Yama is the judge of the dead, weighing each life, his record-keeper Chitragupta holding the account of every deed, and assigning the fate that follows. This makes him not a mere terror but the guarantor of moral order beyond death. His most famous appearance is in the Katha Upanishad, where the boy Nachiketa, sent to Yama's house, waits three days and is granted three boons, using the last to press Yama himself for the secret of what lies beyond death, and Yama's reply is one of the foundational teachings on the immortal atman and the nature of the Self. Yama rides a black buffalo and carries a noose (pasha) with which he draws out the soul, and a mace. This atlas sets him as a face of Pluto, death and judgment.
Yama's cult travelled with Buddhism far beyond India. In East Asian Buddhism he became one of the ten kings who judge the dead in Chinese folk religion, Yanluo Wang, and in Japan Enma-o, both retaining the role of infernal judge while losing the specifically Vedic genealogy of first mortal and twin. In Tibetan Buddhism he reappears doubled, as Yama Dharmaraja, a protector deity, and as the wrathful yidam Yamantaka, "destroyer of Yama," whom Manjushri is said to have manifested precisely to defeat Death itself, so that a single Indian death god generates, across Asia, both a judge to fear and a Buddha strong enough to overcome him.