Yama
Yama (Devanagari: यम) or Yamarāja (यमराज), is a deity of death, dharma, the south direction, and the underworld who predominantly features in Hindu and Buddhist religion, belonging to an early stratum of Rigvedic Hindu deities. In Sanskrit, his name can be interpreted to mean "twin".
He is also an important deity worshipped by the Kalasha and formerly by the Nuristani peoples, indicating his prominence in ancient Hinduism.In Hinduism, Yama is the son of sun-god Surya and Sanjana or Randal Mataji, the daughter of Vishvakarma. Yama is the brother of Sraddhadeva Manu and of his older sister Yami or Yamunaji, which Horace Hayman Wilson indicates to mean the Yamuna. According to the Vedas, Yama is said to have been the first mortal who died. By virtue of precedence, he became the ruler of the departed, and is called "Lord of the Pitrs".Mentioned in the Pāli Canon of Theravada Buddhism, Yama subsequently entered Buddhist mythology in East Asia, Southeast Asia and Sri Lanka as a Dharmapala under various transliterations. He is otherwise also called as "Dharmaraja".

Worship of Yama as creator
There is a Chitral district by the Chitral river in the Swat(Suvastu) region in the north-western Indian subcontinent. The language spoken amongst others are Chitrali and Kalash. Of note is the fact that even in the remaining currently practiced form of ancient Hinduism in the region, certain deities were revered either in one community/tribe or other. Only one was universally revered as the Creator that is the ancient Hindu god Yama Râja called imr'o in Kâmviri. The ancient region had historical and cultural links to the nearby regions of Gilgit-Baltistan, Kashmir and Nooristan. The Srivastu/Suvastu region is also said to be the place of origin of Srivastava clan.

Hinduism
Yama (Sanskrit: यम), is the Hindu god of Death and Justice, and is responsible for the dispensation of law and punishment of sinners in his abode, Yamaloka. Yama is also one of the oldest deities in the pantheon and some of his earliest appearances are found in the Rigveda. From there, he has remained a significant deity, appearing in some of the most important texts of Hinduism which include the Ramayana, the Mahabharata and the Puranas.Yama is also one of the Lokapalas (guardians of the directions), appointed as the protector of the southern direction. Yama is described as having four arms, protruding fangs, and complexion of storm clouds with a wrathful expression; surrounded by a garland of flames; dressed in red, yellow, or blue garments; riding a water-buffalo and holding a sword, noose and a mace to capture the souls of those who have sinned. Legends describe him as the twin of Yamuna, a river goddess associated with life, and the son of the Sun god Surya and Saranyu. Other than Yamuna, he also has many siblings, such as the Ashvins, Shani, Shraddhadeva Manu, Revanta and Tapati. Some of his major appearances include in the tales of the Pandavas, Savitri Satyavan and the sage Markandeya. His assistant is Chitragupta, another deity associated with death.

Buddhism
In Buddhism, Yama (Sanskrit: यम) is a dharmapala, a wrathful god or the Enlightened Protector of Buddhism that is considered worldly, said to judge the dead and preside over the Narakas ("Hell" or "Purgatory") and the cycle of rebirth.
The Buddhist Yama has, however, developed different myths and different functions from the Hindu deity. In Pali Canon Buddhist myths, Yama takes those who have mistreated elders, holy spirits, or their parents when they die. Contrary though, in the Majjhima Nikaya commentary by Buddhagosa, Yama is a vimānapeta – a preta with occasional suffering.In other parts of Buddhism, Yama's main duty is to watch over purgatorial aspects of Hell (the underworld), and has no relation to rebirth. His sole purpose is to maintain the relationships between spirits that pass through the ten courts, similar to Yama's representation in several Chinese religions.He has also spread widely and is known in every country where Buddhism is practiced, including China, Korea, Vietnam, Japan, Bhutan, Mongolia, Nepal, Thailand, Sri Lanka, Cambodia, Myanmar and Laos.

China
In Chinese texts, Yama only holds transitional places in Hell where he oversaw the deceased before he, and the Generals of Five Paths, were assigned a course of rebirth. Yama was later placed as a King in the Fifth Court when texts led to the fruition of the underworld that marked the beginnings of systemizations.

Japan
Yama can be found in one of the oldest Japanese religious works called Nipponkoku Genpō Zen'aku Ryōiki, a literary work compiled by the Monk Keikai in 822. Yama was introduced to Japan through Buddhism, where he was featured as a Buddhist divinity. He holds the same position title as other works depict him – a judge who imposes decisions on the dead who have mistreated others.

Sikhism
In Sikhism, Yamaraja is referred to as Dharam Rai, Dharam Raj and Dharam Raja (in which, dharma is spelt as dharam instead). In Sikhism, Dharam Rai is considered to be a servant of god instead of a god, who works for god. It is believed that the One God had seated Dharam Rai with the task of reading out the being's deeds after the being dies and then assigns them into heaven or hell accordingly. After the perhaps being has spent time in heaven or hell accordingly, then they are assigned to re-enter the 8.4 million life-form cycle again in which they will reincarnate through various lifeforms until they re-attain the human life again. Some Sikhs interpret Dharam Raj literally, however, there are many interpretations where Dharam Raj is representative of the role of the divine judge of actions. The imagery of Yama would have been used in order to explain such a concept to followers of the Sikh Gurus who came from Hindu backgrounds: there is also imagery of the Islamic angel of death that was also used to help followers from Islamic backgrounds. Sikhism does not focus all that much on any type mythology, and rather believes that all mythologies are creations of Waheguru: thus there is not a large focus on them and their details, as Waheguru is the only being to be worshipped. Thus, within the doctrine of Sikhism, Yama represents a divine judge who reads records of people's actions: references to him are more conceptual, rather than the more literal depiction of him in Hindu scripture
Those souls who merge into God, become God, and attain full enlightenment or salvation (known as Moksha and Nirvana) will not be judged by Dharam Rai and will go into another heaven known as Sach Khand.
Also Dharam Rai is referred to as 'The Righteous Judge of Dharma' in the English translation of the Sikh scriptures. Dharam Rai also has assistants that assist him.
Mentions of Yamaraja (known as Dharam Rai in Sikhism) in the Sikh scriptures:
"O Nanak, having created the souls, the Lord installed the Righteous Judge of Dharma to read and record their accounts. There, only the Truth is judged true; the sinners are picked out and separated. The false find no place there, and they go to hell with their faces blackened. Those who are imbued with Your Name win, while the cheaters lose. The Lord installed the Righteous Judge of Dharma to read and record the accounts. ||2||"
(Shri Guru Granth Sahib Ji Maharaj, Ang 463)
"The Righteous Judge of Dharma, by the Hukam of God's Command, sits and administers True Justice. Those evil souls, ensnared by the love of duality, are subject to Your Command. The souls on their spiritual journey chant and meditate within their minds on the One Lord, the Treasure of Excellence. The Righteous Judge of Dharma serves them; blessed is the Lord who adorns them. ||2||"
(Shri Guru Granth Sahib Ji Maharaj, Ang 38 and 39)
"The Righteous Judge of Dharma is a creation of the Lord; he does not approach the humble servant of the Lord."
(Shri Guru Granth Sahib Ji Maharaj, Ang 555)
"Remembering the Lord in meditation, you shall not be punished by the Messenger of Death. The couriers of the Righteous Judge of Dharma shall not touch you."
(Shri Guru Granth Sahib Ji Maharaj, Ang 185)
"The Messenger of Death and the Righteous Judge of Dharma do not even approach the beloved servant of my Lord and Master. ||6||"
(Shri Guru Granth Sahib Ji Maharaj, Ang 980)

Abode
Naraka (Hindu)
Naraka is the Hindu equivalent of Hell, where sinners are tormented after death. In Hindu mythology, Naraka holds many hells, and Yama directs departed souls to the appropriate one. Even elevated Mukti-yogyas and Nitya-samsarins can experience Naraka for expiation of sins.
Although Yama is the lord of Naraka, he may also direct the soul to a Swarga (heaven) or return it to Bhoomi (earth). As good and bad deeds are not considered to cancel each other out, the same soul may spend time in both a hell and a heaven. The seven Swargas are: Bhuvas, Swas (governed by Indra), Tharus, Thaarus, Savithaa, Prapithaa, and Maha (governed by Brahma).

Naraka (Sikhism)
The idea of Naraka in Sikhism is the equivalent of Hell. Naraka is a place where sinners are punished. Each sin has a particular punishment. For a lustful person, there is a door to a fire chamber. There is a doorway for those who had listened to other people's gossip. They are punished by having red hot liquid iron poured into their ears. Liars have their tongues cut off. Thieves have their hands cut off.

Naraka (Buddhist)
In the Jātakas the Narakas are mentioned as Yama's abode (referred to in Pali as Yamakkhaya, Yamanivesana, Yamasādana, etc.). It is also noted that all of Samsāra is subject to Yama's rule, and escape from samsāra means escape from Yama's influence.
The Vetaranī River is said to form the boundary of Yama's kingdom. Elsewhere, it is referred to as consisting of Ussadaniraya (Pali; Sanskrit: Ussadanaraka), the four woeful planes, or the preta realm.Naraka is usually translated into English as "hell" or "purgatory".  A Naraka differs from the hells of western religions in two respects.  First, beings are not sent to Naraka as the result of a divine judgment and punishment; second, the length of a being's stay in a Naraka is not eternal, though it is usually very long. Instead, a being is born into a Naraka as a direct result of his or her previous karma (actions of body, speech and mind), and resides there for a finite length of time until his karma has exhausted its cumulate effect.

East Asian mythology
The Chinese concept of Diyu (地狱, Japanese: Jigoku, Korean: Jiok, Vietnamese: Địa ngục) literally "earth prison", is the realm of the dead or "hell" in Chinese mythology and Japanese mythology.  It is based upon the Buddhist concept of Naraka combined with local afterlife beliefs.  Incorporating ideas from Taoism and Buddhism as well as traditional religion in China, Di Yu is a kind of purgatory place which serves not only to punish but also to renew spirits ready for their next incarnation.  This is interchangeable with the concept of Naraka. In Chinese Buddhism, he is also regarded as one of the Twenty Devas (二十諸天 Èrshí Zhūtiān) or the Twenty-Four Devas (二十四諸天 Èrshísì zhūtiān), a group of protective dharmapalas.In Japanese mythology, Enma-O(閻魔王) or Enma Dai-O (閻魔大王:listen , Great King Enma) judges souls in Meido, the kingdom of the waiting dead. Those deemed too horrible are sent to Jigoku, a land more comparable to the Christian hell. It is a land of eternal toil and punishment. Those of middle note remain in meido for a period awaiting reincarnation. Others, of high note, become honored ancestors, watching over their descendants.

Yama Temple
Yama Dharmaraja Temple is a Hindu temple located at Thiruchitrambalam in the Thanjavur district of Tamil Nadu, India. The temple is dedicated to Yama.

Related concepts
In Iranian mythology
In the Zend-Avesta of Zoroastrianism, a parallel character is called "Yima".
The pronunciation "Yima" is peculiar to the Avestan dialect; in most Iranian dialects, including Old Persian, the name would have been "Yama". In the Avesta, the emphasis is on Yima's character as one of the first mortals and as a great king of men. Over time, *Yamaxšaita was transformed into Jamšēd or Jamshid, celebrated as the greatest of the early shahs of the world.
Both Yamas in Zoroastrian and Hindu myth guard hell with the help of two four-eyed dogs.It has also been suggested by I. M. Steblin-Kamensky that the cult of Yima was adopted by the Finno-Ugrians.  According to this theory, in Finnish Yama became the god cult Jumula and Joma in Komi. According to this hypothesis, from this cult, the Hungarians also borrowed the word vara which became vár 'fortress' and város 'town'. (ibid)

In Javanese culture
There is a door-god Yamadipati in Javanese culture, preserved especially in wayang. The word adipati means ruler or commander. When Hinduism first came to Java, Yama was still the same as Yama in Hindu myth. Later, as Islam replaced Hinduism as the majority religion of Java, Yama was demystified by Walisanga, who ruled at that time. So, in Javanese, Yama became a new character. He is the son of Sanghyang Ismaya and Dewi Sanggani. In the Wayang legend, Yamadipati married Dewi Mumpuni. Unfortunately, Dewi Mumpuni fell in love with Nagatatmala, son of Hyang Anantaboga, who rules the earth. Dewi Mumpuni eventually left Yamadipati, however.

In Buddhist temples
In Chinese Buddhism, Yama is also regarded as one of the Twenty Devas (二十諸天 Èrshí Zhūtiān) or the Twenty-Four Devas (二十四諸天 Èrshísì zhūtiān), a group of protective dharmapalas consisting of devas adopted from Hinduism and Taoism. His statue is usually enshrined in the Mahavira halls of Chinese Buddhist temples along with the statues of the other devas.
In the Buddhism of the Far East, Yama is one of the twelve Devas, as guardian deities, who are found in or around Buddhist shrines (Jūni-ten, 十二天). In Japan, he has been called "Enma-Ten". He joins these other eleven Devas of Buddhism, found in Japan and other parts of southeast Asia: Indra (Taishaku-ten), Agni (Ka-ten), Yama (Emma-ten), Nirrti (Rasetsu-ten), Vayu (Fu-ten), Ishana (Ishana-ten), Kubera (Tamon-ten), Varuna (Sui-ten) Brahma (Bon-ten), Prithvi (Chi-ten), Surya (Nit-ten), Chandra (Gat-ten).

See also
References
External links
 Media related to Yama at Wikimedia Commons