The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"Friend Hārita," etc.—This story the Master dwelling at Jetavana told concerning a discontented Brother. Now this Brother after seeing a smartly attired woman grew discontented and allowed his hair and nails to grow long, and wished to return to the world. And when he was brought against his will by his teachers and preceptors to the Master, and was asked by him, if it were true that he was a backslider, and if so why, he said, "Yes, your Reverence, it is owing to the power of sinful passion, after seeing a beautiful woman."  The Master said, "Sin, Brother, is destructive of virtue, and insipid withal, and causes a man to be re-born in hell; and why should not this sin prove your destruction? For the hurricane that smites Mount Sineru is not ashamed to carry off a withered leaf. But owing to this sin men who walk according to knowledge and wisdom, and have acquired the five Faculties and the eight Attainments, though they were great and holy men, being unable to fix their thoughts, fell away from mystic meditation." And then he told a story of the past.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta was born in a certain village in a brahmin family worth eighty crores, and from his golden complexion they called him Harittacakumāra (Young Goldskin). When he was grown up, and had been educated at Takkasilā, he set up as a householder, and on the death of his father and mother he made inspection of his treasures and thought, "The treasure only continues to exist, but they who produced it cease to exist: I too must be reduced to atoms by means of death," and alarmed by the fear of death he gave great gifts, and entering the Himālaya country he adopted the religious life, and on the seventh day he entered upon the Faculties and Attainments. There for a long time he lived on wild fruit and roots, and going down from the mountain to procure salt and vinegar, he in due course reached Benares. There he abode in the royal park, and on the next day in going his round for alms he came to the door of the king's palace. The king was so glad to see him that he sent for him and made him sit on the royal couch beneath the shade of the white umbrella, and fed him on all manner of dainties, and on his returning thanks the king being exceedingly pleased asked him, "Reverend Sir, where are you going?" "Great king, we are looking out for a dwelling-place for the rainy season." "Very well, Reverend Sir," he said, and after the early meal he went with him to the park, and had quarters both for the day and night built for him, and, assigning the keeper of the park as his attendant, he saluted him and departed. The Great Being from that time fed continually in the palace, and lived there twelve years.
Now one day the king went to quell a disturbance on the frontier,  and committed the Bodhisatta to the care of the queen, saying, "Do not neglect our "Field of Merit." Thenceforth she ministered to the Great Being with her own hands.
Now one day she had prepared his food, and as he delayed his coming, she bathed in scented water, and put on a soft tunic of fine cloth, and opening the lattice lay down on a small couch, and let the wind play upon her body. And the Bodhisatta later on in the day, dressed in a goodly inner and outer robe, took his alms-bowl and walking through the air came to the window. As the queen rose up in haste, at the rustling sound of his bark garments, her robe of fine cloth fell from off her. An extraordinary object struck upon the eye of the Great Being. Then the sinful feeling, that had been dwelling for countless aeons in his heart, rose up like a snake lying in a box, and put to flight his mystic meditation. Being unable to fix his thoughts he went and seized the queen by the hand, and forthwith they drew a curtain round them. After misconducting himself with her, he partook of some food and returned to the park. And every day thenceforth he acted after the same manner.
His misconduct was blazed abroad throughout the whole city. The king's ministers sent a letter to him, saying, "Hārita, the ascetic, is acting thus and thus."
The king thought, "They say this, being eager to separate us," and disbelieved it. When he had pacified the border country he returned to Benares, and after marching in solemn procession round the city, he went to the queen and asked her, "Is it true that the holy ascetic Hārita mis-conducted himself with you?" "It is true, my lord." He disbelieved her also, and thought, "I will ask the man himself," and going to the park he saluted him, and sitting respectfully on one side he spoke the first stanza in the form of a question:
A sinful life is by your Reverence led;
I trust there is no truth in this report,
And thou art innocent in deed and thought?
 He thought, "If I were to say I am not indulging in sin, this king would believe me, but in this world there is no sure ground like speaking the truth. They who forsake the truth, though they sit in the sacred enclosure of the Bo tree, cannot attain to Buddhahood. I must needs just speak the truth." In certain cases a Bodhisatta may destroy life, take what is not given him, commit adultery, drink strong drink, but he may not tell a lie, attended by deception that violates the reality of things. Therefore speaking the truth only he uttered the second stanza:
Caught by the world's delusive arts, I erred.
Hearing this the king spoke the third stanza:
The passions that within his bosom swell.
Then Hārita pointed out to him the power of sin and spoke the fourth stanza:
That in their power are over-mastering:
Lust, hate, excess and ignorance their name;
Knowledge can here no certain footing claim.
 The king on hearing this spoke the fifth stanza:
The saintly Hārita wins our respect.
Then Hārita spoke the sixth stanza:
Corrupt the sage to saintliness inclined.
Then the king, encouraging him to throw off sinful passion, spoke the seventh stanza:
Is marred by lust, born of this mortal frame;
Away with it, and blessings shall be thine,
And multitudes thy wisdom shall proclaim.
Then the Bodhisatta recovered the power to concentrate his thoughts, and observing the misery of sinful desire, he spoke the eighth stanza:
All growth of lust I cut down to the root.
 So saying he asked the king's leave, and having gained his consent he entered his hermit hut, and fixing his gaze on the mystic circle he entered into a trance, and came forth from the hut, and sitting cross-legged in the air he taught the king the true doctrine and said, "Great king, I have incurred censure in the midst of the people by reason of my dwelling in a place where I ought not. But be thou vigilant. Now will I return to some forest free from all taint of womankind." And amidst the tears and lamentations of the king he returned to the Himālaya, and without falling away from mystic meditation he entered the Brahma world.
The Master knowing the whole story said:
And lust forsaking did to Brahma world ascend.
And having in his Perfect Wisdom spoken this stanza, he declared the Truths and identified the Birth:—At the conclusion of the Truths the worldly-minded Brother attained to Sainthood:—"At that time the king was Ānanda Hārita was myself."