The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"No throne on earth," etc.—The Master told this story while in residence at Jetavana, about a backsliding brother, who in going his rounds for alms at Sāvatthi caught sight of a beautiful woman, and thenceforth had grown discontented and lost all pleasure in the Law. So the Brethren brought him before the Blessed One. Said the Blessed One, "Is it true, Brother, what I hear, that you are discontented?" He confessed it was so. The Master on learning the cause of his discontent said, "Why, Brother, are you longing for the world, after taking orders in a religion that leads to Salvation? Wise men of old when offered the dignity of family priest rejected it, and adopted the ascetic life." And he told them a story of the olden time.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta was conceived in the womb of the brahmin wife of the king's chaplain,  and was born on the same day as the king's son. And when the king asked his ministers if any child had been born on the same day as his son, they said, "Yes, Sire, a son of your family priest." So the king had him brought and given into the charge of nurses to be carefully tended together with the young prince. And they both had the same ornaments to wear and had exactly the same things to eat and drink.
[paragraph continues] And when they were grown up, they went together to Takkasilā and as soon as they had attained proficiency in all the sciences they returned home.
The king made his son viceroy and bestowed great honour upon him. From that time the Bodhisatta ate, drank, and lived with the prince, and there was a firm friendship between them. By and bye at the death of his father, the young prince ascended the throne and enjoyed great prosperity. Thought the Bodhisatta: "My friend now rules the kingdom; when he sees a fitting opportunity, he will certainly give me the office of his family priest. What have I to do with a householder's life? I will become an ascetic and devote myself to solitude."
So he saluted his parents and having asked their permission to take orders, he gave up his worldly fortune and setting forth quite alone he entered the Himālaya country. There on a charming spot he built himself a hermitage, and adopting the religious life of an anchorite he developed all the Faculties and Attainments, and lived in the enjoyment of the pleasure of the mystic life.
At this time the king remembered him and said, "What has become of my friend? He is nowhere to be seen." His ministers told him he had taken orders, and was living, they heard, in some delightful grove. The king asked the place of his abode, and said to a councillor named Sayha, "Go and bring my friend back with you. I will make him my chaplain." Sayha readily assented, and going forth from Benares in course of time reached a frontier village and taking up his abode there, he went with some foresters to the place where the Bodhisatta dwelt and found him sitting like a golden statue at the door of his hut. After saluting him with the usual compliments he sat at a respectful distance and thus addressed him: "Reverend Sir, the king desires your return, being anxious to raise you to the dignity of his family priest."  The Bodhisatta replied, "If I were to receive not merely the post of chaplain but all Kāsi and Kosala, and the realm of India and the glory of a Universal Empire, I would refuse to go. The wise do not again take up the sins they have once abandoned any more than they would swallow the phlegm they have once raised." So saying he repeated these stanzas:—
1 Better through earth a homeless waif to stray,
No sea-girt realm, safe-guarded in the deep;
Accurséd be the lust of wealth and fame
That dooms poor man in "Suffering Worlds" to weep.
And bowl in hand to beg from door to door,
Than as a king, to sinful lusts a prey,
To bear a tyrant rule and vex the poor.
Better through earth a homeless waif to stray,
Thus did the Bodhisatta though again and again importuned by him reject his offer. And Sayha, being unable to prevail on him, saluted him, and returned and told the king of his refusal to come.
 When the Master had brought his lesson to an end, he revealed the Truths and identified the Birth:—At the conclusion of the Truths the backsliding Brother attained to fruition of the First Path. Many others too experienced like fruits of Conversion:—"At that time Ānanda was the king, Sāriputta was Sayha, and I myself was the family priest."
21:1 These stanzas occur again in Jātaka 433.