The Bodhisatta was once an ascetic who lived alone in the Himalayas and had reached full insight. One time while on a short trip to the city, he slept in the royal park. The next morning the king saw the Bodhisatta out collecting alms and, impressed by his demeanor, invited him into the palace for a big meal. After they talked, the king invited the Bodhisatta to remain in the city and live permanently in the park. The Bodhisatta accepted the offer and stayed there, being fed and cared for by the king, for sixteen years.
When the king needed to go put down an uprising in the border region, he told his queen to ensure the Bodhisatta was well taken care of. One morning the Bodhisatta was late departing to the palace for his meal, so he flew through the air. Hearing him arriving outside, the queen hastily rose to greet him and her robe slipped off. The Bodhisatta saw her naked and was overcome by the sight; his heart filled with lust and his insight vanished. He took his food back to his hut and remained alone for seven days, but he continued to burn with lust.
When the king returned he went to visit the Bodhisatta, and saw that he had taken ill. When the Bodhisatta explained what really ailed him, and for whom his lust was aimed, the king gave him the queen. But in secret he told his queen to follow his plan to save the Bodhisatta. They left the palace to take up residence in an abandoned house that passersby used as a toilet. The queen directed the cleaning and repair while the Bodhisatta did all the work. She sent the Bodhisatta to the palace to fetch every tool, material, and furnishing one at a time and came up with as many tasks as she could, making the project as long and difficult as possible.
When the house was finally finished, the queen lied on the bed with the Bodhisatta and grabbed his beard, drawing his face toward hers; but instead of giving him a kiss, she said “How have you forgotten that you are a holy man?” Shocked, the Bodhisatta suddenly came to his senses and realized how close he had come to the doom of hell at the end of this lifetime.
Cured of his lust, he rushed to the palace, gave the queen back to the king, and returned to the mountains, his power of insight restored.
In the Lifetime of the Buddha
One of the Buddha’s disciples, while out on a morning alms round, saw a woman so beautiful he fell in love at first sight. He no longer took joy in his studies or meditation and became so depressed he stopped cleaning himself. The Buddha told him this story to remind him that controlling natural passions is difficult and takes great effort, even for highly purified people.
The king and queen were earlier births of Ananda and Uppalavanna, two of the Buddha’s top disciples.