Yama is the Hindu god of death and lord of the departed, and his authority rests on a striking idea: he was the first mortal to die, and so the one who first found the path to the other world and now rules there as its king. In the Rigveda he and his twin sister Yami are the first human pair, and Yama, choosing death, becomes the pathfinder who opens the way that all the dead follow after him. He is the son of Surya, the sun, and one of the guardians of the directions, keeping the south, the direction of the dead.
Yama's role is old enough to predate the split between the Vedic and Iranian branches of Indo-Iranian religion: the Avestan Yima, first king and later ruler of a paradise for the dead, shares both a name and a founding function with Yama, so scholars read the two figures as parallel developments of a common Indo-Iranian myth of the first mortal rather than a borrowing in either direction. The Rigveda's funeral hymns, notably RV 10.14, sung at cremation, address Yama directly as king of the fathers, the pitrs, and ask him to guide the departed along the path he opened, making him from the earliest Vedic period not only judge but also host of the ancestral dead.