Yanluo, or Yanluo Wang, is the king and chief judge of the underworld, Diyu, in Chinese belief, the presiding magistrate over the dead. He is a figure adapted from the Indian Yama, the lord of death, who entered China with Buddhism and was then thoroughly woven into Chinese folk and Daoist tradition and reshaped along Chinese lines. In the developed Chinese conception the underworld is organised, like the world above, as a bureaucracy, a vast administrative system of courts through which the souls of the dead must pass, and Yanluo presides over this infernal government. He is most often identified as the ruler of one of the Ten Kings of Hell, the ten magistrate-gods who each judge the dead in a successive court, weighing the deeds of a lifetime, assigning punishment for wrongdoing in the appropriate hell, and determining the circumstances of the soul's next rebirth.
Yanluo is imagined as a stern judge in the robes and cap of a Chinese official, seated in his court with his registers and his demon-attendants, before whom the dead are brought to account. His role expresses the strong moral dimension of Chinese views of the afterlife, the conviction that deeds are recorded and repaid, and that death leads not to oblivion but to judgement and to a rebirth shaped by one's conduct. The adaptation of the Indian Yama into the Chinese Yanluo, refitted as a bureaucratic magistrate, is a clear example of how Buddhism's gods were absorbed and remade within Chinese religion.