The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"’Though thou art now," etc.—This story the Master, while living in the Bhesakalā grove near Suṁsumāragiri (Mount Crocodile) in the country of the Bhaggas, told concerning young prince Bodhi. This prince was the son of Udena, and at this time dwelt in Suṁsumāragiri. Now he summoned a very skilful artisan, and got him to build him a palace called Kokanada, and to make it unlike that of any other king.  And afterwards he thought, "This artisan may build a similar palace for some other king." And from a feeling of envy he plucked out his eyes. This circumstance became known in the assembly of the Brethren. Then they raised a discussion in the Hall of Truth, saying, "Sirs, young prince Bodhi had the eyes of such and such an artisan put out. Surely he is a harsh, cruel, and violent man." The Master came and asked what was the topic the Brethren were debating as they sat together, and hearing what it was he said, "Not now only, but formerly too such was his nature, and of old in like manner he put out the eyes of a thousand warriors and, after slaying them, he offered up their flesh as a religious sacrifice." And so saying he told them a story of past times.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta became a world-renowned teacher at Takkasilā, and youths of the warrior and brahmin castes came from all India, to be taught the arts by him. The son of the king of Benares too, prince Brahmadatta, was taught the three Vedas by him. Now he was by nature harsh, cruel, and violent. The Bodhisatta, by his power of divination knowing his character, said, "My friend, you are harsh, cruel, and violent, and verily power that is attained by a man of violence is shortlived: when his power is gone from him, he is like a ship that is wrecked at sea. He reaches no sure haven. Therefore be not of such a character." And by way of admonition he repeated two stanzas:—
Each one shall fare according to his deed,
Such happy fate may short-lived prove to be:
Should riches perish, be not sore distrest,
Like storm-tost sailor wrecked far out at sea.
And reap the harvest as he sows the seed,
Whether of goodly herb, or maybe noxious weed.
Each one shall fare according to his deed,
 Then he bade his teacher farewell and returned to Benares, and after exhibiting his proficiency in the arts to his father, he was established in the viceroyalty and on his father's death he succeeded to the kingdom. His family priest, Piṅgiya by name, was a harsh and cruel man. Being greedy of fame, he thought, "What if I were to cause all the rulers of
[paragraph continues] India to be seized by this king, and if he should thus become sole monarch and I become sole priest?" And he got the king to hearken to his words.
And the king marched forth with a great army and invested the city of a certain king and took him prisoner. And by similar means he gained the sovereignty of all India, and with a thousand kings in his train, he went to seize upon the kingdom of Takkasilā. The Bodhisatta repaired the walls of the city and made it impregnable to its enemies. And the king of Benares had a canopy set up over him and a curtain thrown round about him, at the foot of a big banyan tree on the banks of the Ganges. And having a couch spread for him, he took up his quarters there. Fighting in the plains of India he had taken captive a thousand kings, but failing in his attack on Takkasilā, he asked his priest, "Master, though we have come hither with a host of-captive kings, we cannot take Takkasilā. What now are we to do?"
"Great king," he answered, "put out the eyes of the thousand kings  and ripping open their bellies let us take their flesh and the five sweet substances and make an offering to the guardian deity of this banyan. And surrounding the tree with a rimmed circumference let us fill it with blood five inches deep. And so shall the victory soon be ours."
The king readily assented and concealing mighty wrestlers behind the curtain, he summoned each king separately, and when the wrestlers had squeezed them in their arms till they had reduced them to a state of insensibility, he had their eyes put out, and after they were dead, he took the flesh and caused the carcases to be carried away by the Ganges. Then he made the offering, as described above, and had the drum beaten and went forth to battle. Then came a certain Yakkha from his watch-tower and tore out the right eye of the king. Severe pain set in, and maddened by the agony he suffered, he went and lay down at full length upon the couch prepared for him at the foot of the banyan tree. At this moment a vulture took a sharp-pointed bone, and perched on the top of the tree, in eating the flesh it let drop the bone, and the sharp point falling as with iron spikes on the king's left eye, destroyed that eye too. At this moment he recalled the words of the Bodhisatta and said, "Our teacher when he said "These mortals experience results corresponding to their deeds, even as fruit corresponds with the seed," spoke, I suppose, with all this before his mind's eye." And in his lamentation he addressed Piṅgiya in two stanzas:—
The Master taught me in my heedless youth:
"Sin not," he cried, "or else the evil deed
To thine own punishment may one day lead."
Libation due of sandal oil was made.
’Twas here I slew a thousand kings, and lo!
The pangs they suffered then, I now must undergo.
 Thus lamenting, he called to mind his queen-consort, and repeated this stanza:—
Lithe as a shoot of fair moringa tree,
That dost thy limbs with sandal oil bedew,
How should I live, bereft of sight of thee?
Yea death itself than this less grievous far would be!
While he was still murmuring these words, he died and was born again in hell. The priest so ambitious of power could not save him, nor could he save himself by his own power, and as soon as he died, his army broke up and fled.
The Master, having ended his lesson, thus identified the Birth: "At that time the young prince Bodhi was the marauding king, Devadatta was Piṅgiya, and I myself was the world-famed teacher."