The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
"Ye gods are here," etc.--This story the Master told during a stay in Veḷuvana, how Devadatta tried to kill hips. Hearing that Devadatta went about to kill him, he said, "Brethren, this is not the only time that Devadatta has been trying to kill me; he tried to do so before, and failed." Then he told them this story.
Once upon a time Brahmadatta was reigning in Benares, when the Bodhisatta came to life as the son of a householder who lived in a village not far from the city.
When he came to years, they fetched a young lady of family from Benares to marry him. She was a fair and lovely maiden, beautiful as a nymph divine, graceful like a twining creeper, ravishing as a sylph. Her name was Sujātā; she was faithful, virtuous, and dutiful. She always did duly her devoir to her lord and his parents. This girl was very dear and precious to the Bodhisatta.  So they two dwelt together in joy, and unity, and oneness of mind.
On a day Sujātā said to her husband, "I have a wish to see my mother and father."
"Very good, my wife," replied he; "make ready food sufficient for the journey." He caused food of all sorts to be cooked, and placed the provisions in a waggon; since he drove the vehicle, he sat in front, and his wife behind. To Benares they went; and there they unyoked the waggon, and washed, and ate. Then the Bodhisatta yoked the oxen
again, and sat in front; and Sujātā, who had changed her dress and adorned herself, sat behind.
As the waggon entered the city, the king of Benares happened to he making a solemn circuit round the place mounted upon the back of a splendid elephant; and he passed by that place. Sujātā had come down out of the cart, and was walking behind on foot. The king saw her: her beauty so attracted his eye, that he became enamoured of her. He called one of his suite. "Go," said he, "and find out whether yon woman has a husband or no." The man did as he was bid, and came back to tell the king. "She has a husband, I am told," said he; "do you see that man sitting in the cart yonder? He is her husband."
The king could not smother his passion, and sin entered into his mind. "I will find some way of getting rid of this fellow," thought he, "and then I will take the wife myself." Calling to a man, he said, "Here, my good fellow, take this jewelled crest, and make as though you were passing down the street. As you go, drop it in the waggon of yonder man." So saying, he gave him a jewelled crest, and dismissed him. The man took it, and went; as he passed the waggon, he dropped it in; then he returned, and reported to the king that it was done.
"I have lost a jewelled crest!" cried the king: the whole place was in an uproar.
"Shut all the gates!" the king gave order: "cut off the outlets! hunt the thief!" The king's followers obeyed. The city was all confusion! The other man, taking some others with him, went up to the Bodhisatta, crying--"Hullo! stop your cart!  the king has lost a jewelled crest; we must search your cart! "And search it he did, till he found the jewel which he had put there himself. "Thief!" cried he, seizing the Bodhisatta; they beat him and kicked him; then binding his arms behind him they dragged him before the king, crying out--"See the thief who stole your jewel!" "Off with his head!" was the king's command. They scourged him with whips, and tormented him at every street corner, and cast him out of the city by the south gates.
Now Sujātā left the waggon, and stretching out her arms she ran after him, wailing as she went--"O my husband, it is I who brought you into this woful plight!" The king's servants threw the Bodhisatta upon his back, with the intent to cut off his head. When she saw this, Sujātā thought upon her own goodness and virtue, reflecting thus within herself; "I suppose there can be no spirit here strong enough to stay the hand of cruel and wicked men, who work mischief to the virtuous"; and weeping and wailing she repeated the first stanza:--
As this virtuous woman thus lamented, the throne of Sakka 1, king of the Gods, grew hot as he sat upon it.  "Who is it that would make me fall from my godhead?" thought Sakka. Then he was ware of what was befalling. "The king of Benares," he thought, "is doing a very cruel deed. He is making the virtuous Sujātā miserable; now I must go thither!" So descending from the godworld, by his own power he dismounted the wicked king from the elephant on whose back he was riding, and laid him upon his back in the place of execution, but the Bodhisatta he caught up, and decked him with all kinds of ornaments, and made the king's dress come upon him, and set him on the back of the king's elephant. The servants lifted the axe and smote off a head--but it was the king's head; and when it was off, they knew that it was the head of the king.
Sakka took upon him a visible body, and came before the Bodhisatta, and consecrated him to be king; and caused the place of chief queen to be given to Sujātā. And as the courtiers, the brahmins and householders, and the rest, saw Sakka, king of the gods, they rejoiced, saying, "The unrighteous king is slain! now have we received from the hands of Sakka a king who is righteous!" And Sakka stood poised in the air, and declared, "This your righteous king from this time forth shall rule in righteousness. If a king be unrighteous, God sends rain out of season, and in season he sends no rain: and fear of famine, fear of pestilence, fear of the sword--these three fears come upon men for him." Thus did he instruct them, and spake this second verse:--
 Thus did Sakka admonish a great concourse of folk, and then he went straight to his divine abode. And the Bodhisatta reigned in righteousness, and then went to swell the hosts of heaven.
The Master, having ended this discourse, thus identified the Birth:--"At that time Devadatta was the wicked king; Anuruddha was Sakka; Sujātā was Rāhula's mother; but the king by Sakka's gift was I myself."