The Bodhisatta was once born into a very rich family of Benares. When his parents died he gave away his wealth, became an ascetic in the Himālaya, and developed iddhi powers. During the rains he returned to Benares, where, at the king's invitation, he lived in the royal park. For twelve years he did this, till, one day, the king had to leave to quell a frontier rebellion, after having instructed the queen to look after the ascetic. One evening the ascetic returned rather late to the palace, and the queen, rising hastily at his arrival, let her garment slip. The ascetic's mind became filled with thoughts of lust, and he lost his powers. On his return to the hermitage, he lay there for seven days without touching food. On his return, the king visited the ascetic, who explained that his heart had been wounded. Asking the king to retire from the hut, he once more developed his trance. He then took leave of the king and returned to Himavā.
The story was told to a monk who was filled with discontent because he had fallen in love with a woman whom he met on his alms rounds. The king is identified with Ananda. J.ii.271-77.