The god of death. (See, e.g., DhA.iii.337; Yamassa santikam = Maranasantikam).
When beings die they are led before him to be judged according to their deeds. Birth, old age, illness, punishment for crime and death, are regarded as his messengers, sent among men as a warning to abstain from ill and do good. Yama questions beings brought before him as to whether they have seen these messengers and profited by them. If the answer is in the negative, the nirayapálas take them away to the different hells (M.iii.179ff).
In the Mahásamaya Sutta (D.ii.259) mention is made of two Yamas (duve Yamá), which the Commentary explains (DA.ii.690) by "dve Yamakadevatá" (the twins, whom Rhys Davids calls the Castor and Pollux of Indian Mythology, in Dial.ii.290, n.1). Elsewhere (AA.i.374; MA.ii.953) Buddhaghosa speaks of four Yamas (im c' esa eko va hoti, catusu pana dváresu cattáro janá honti) at the four gates (of the Nirayas?). He says that Yama is a Vemánikapetarájá, who sometimes enjoys all the pleasures of heaven, in a celestial mansion, surrounded by kapparukkhas, and at other times experiences the fruits of his kamma. He is a good king.
In the Játakas* the Nirayas are particularly mentioned as Yama's abode (Yamakkhaya, Yamanivesana, Yamasádana, etc.); but, more generally, all Samsára is considered as subject to Yama's rule, and escape from samsára means escape from Yama's influence, Yama being the god of Death. It is evidently in this sense that Yama is called Vesáyi (q.v.) (J.ii.317, 318). Yama is sometimes mentioned** with Indra, Varuna, Soma, Pajápati, etc., as a god to whom sacrifices are offered. There is a tradition (A.i.142) that once Yama longed to be born as a human being and to sit at the feet of a Tathágata.
Yama's Nayanáyudha is mentioned (SNA.i.225) among the most destructive of weapons.
* E.g., J.ii.318; iv.273; v.268, 274, 304. The Vetaraní is mentioned as forming the boundary of Yama's kingdom (i.21; J.ii.317; iii.472; but see ii.318). At J.iv.405, Yama's abode is called Ussadaniraya. DhA.i.334 explains Yamaloka by Catubbidham apáyalokam. Cp. PvA.33 (Yamaloko ti petaloko); ibid., 107 (Yamavisayam = Petalokam).
** E.g., J.vi.201; D.i.244; at Mil.37 the list includes Kuvera, Suyáma and Santusita; cp. Mtu i.265; iii.68, 77; 77, 307.