Once the Bodhisatta was a teacher in Takkasilā, and the heir to the throne of Benares was his student. Foreseeing danger to the prince from his son, he taught the prince four stanzas to be repeated when his son should be sixteen years old, at the evening meal, at the time of the great levee, while ascending the palace roof, and in the royal chamber respectively. The prince in due course became king, and, as had been foreseen by his teacher, he was conspired against by his son, but saved his life by repeating the stanzas. The son was cast into prison, and set free only after the king's death.
The story was related in reference to Bimbisāra's great love for Ajātasattu, though soothsayers had predicted that the latter would kill his father (J.iii.121ff).