Yama came to be the god of death in later mythology, but he had wide range of roles in the earlier mythology. In the Rigveda Yama was one of the first pair. As such he was referred to as the first mortal (later being called the first human).
His twin sister Yamî wanted him as her partner, but he refused. Later mythology charged him with incest. In the earliest mythology he was the son of Vivasvat, an early solar deity. Later he was assimilated into Dharma, god of social order, and made one of the guardians of the four corners of the earth (Lokapâlas).
Yama was personi- fied in the Katha Upanishad, and his talk with the youth Naciketas about the nature of death and its mystery portrayed him as a great philosopher-teacher. During his evolution in later mythology Yama became more sinister, the feared god of death.
His two dogs, Syama and Sabala, came for souls, no longer leading them to Devayâna (way of the gods) or Pitryâna (way of the departed ancestor spirits), but to a stopover in Pâtâla (hell).
Pâtâla too had changed from a comfortable abode of the dead to a realm of punishment populated with all sorts of dreadful creatures: rakshâsas (blood-thirsty demons), yakshas (tree spirits), ganas (dwarves), and angirasas (a class of ghosts), as well as souls of the dead.