Yama Dharmaraja (Sanskrit: यम) is the Lord of Justice and is sometimes referred to as Dharmaraja in reference to his unswerving dedication to maintaining order and adherence to harmony. Sometimes refered as the Lord of Death, it is said that he is also one of the wisest of the devas. Yama's name can be interpreted to mean "twin", and in some accounts he is paired with a twin sister Yamī.
Yama is assisted by Chitragupta who is assigned with the task of keeping complete records of actions of human beings on the earth, and upon their death, deciding to have them reincarnated as a superior or inferior organism, depending on their Karma (actions on the earth).
Characteristics of Yama
Yama is a Lokapāla and an Aditya. In art, he is depicted with green or red skin, red clothes, and riding a water buffalo. He holds a loop of rope in his left hand with which he pulls the soul from the corpse. He is the son of Surya (Sun) and twin brother of Yami, or Yamuna, traditionally the first human pair in the Vedas. He was also worshiped as a son of Vivasvat and Saranya. He is one of the Guardians of the directions and represents the south. He is described as reporting to either Vishnu (the maintainer) or Shiva (the destroyer) from the Trimurti (Hinduism's triune Godhead). Three hymns (10, 14, and 135) in the Rig Veda Book 10 are addressed to him.
Yama is also the god of justice and is sometimes referred to as Dharma, in reference to his unswerving dedication to maintaining order and adherence to harmony. It is said that he is also one of the wisest of the devas. In the Katha Upanishad, among the most famous Upanishads, Yama is portrayed as a teacher. He is the father of Yudhisthira (also known as Dharmaraja), the oldest brother of the 5 Pandavas (Karna was born prior to Kunti's wedlock, so technically Karna is Yudhishthira's older brother) and is said to have incarnated as Vidura by some accounts in the Mahabharata period.
Garuda Purana mentions Yama often. His description is in 2.5.147-149: "There very soon among Death, Time, etc. he sees Yama with red eyes, looking fierce and dark like a heap of collyrium, with fierce jaws and frowning fiercely, chosen as their lord by many ugly, fierce-faced hundreds of diseases, possessing an iron rod in his hand and also a noose. The creature goes either to good or to bad state as directed by him." In 2.8.28-29, "…the seven names of Yama, viz Yama, Dharma-raja, Mrtyu, Antaka, Vaivasvata, Kala, Sarva-pranahara…". His wife is Syamala (3.17.4-5, 3.29.16, 24-25).
Subordination to Shiva and Vishnu
Yama, although one of the most powerful controllers, is still subordinate to the controllers Shiva and Vishnu because they are different aspects of the overuling Brahman. A story of Yama's subordinance to Shiva is well-illustrated in the story of Markandeya.
Yama is called Kala ("time"), while Shiva is called Mahakala ("greater time").
Another story, found in the Bhagavata Purana, shows Yama's subordinance to Vishnu. The man Ajamila had committed many evil acts during his life such as stealing, abandoning his wife and children, and marrying a prostitute. At the moment of his death he involuntarily chanted the name of Narayana (another Sanskrit name for Vishnu) and achieved moksha, becoming saved from the messengers of Yama. Although Ajamila had actually been thinking the name of his youngest son, Narayana's name has powerful effects, and thus Ajamila was released from his great sins.