Taught at the Sakyan township of Nagaraka (v.l. Sakkara, Sakkhara). Ānanda mentions to the Buddha his view that half the holy life consists in friendship with the good. The Buddha says that it is not just half but the whole of the holy life, and proceeds to explain (S.v.2).
In the Kalyāṇamitta Sutta (S.i.87) we find the Buddha relating this incident to Pasenadi.