The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"You made yourself," etc.—The Master told this while dwelling in Jetavana, concerning good works towards one's relatives. The occasion will appear in the Bhaddasāla Birth 2. They began talking in the Hall of Truth, saying, "The supreme Buddha does good works towards his relatives."  When the Master had asked and been told their theme, he said, "Brethren, this is not the first time a Tathāgata has done good works towards his relatives," and so he told a tale of old time.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta was born of a monkey's womb. When he grew up and attained stature and stoutness, he was strong and vigorous, and lived in the Himālaya with a retinue of eighty thousand monkeys. Near the Ganges bank there was a mango tree (others say it was a banyan), with branches and forks, having a deep shade and thick leaves, like a mountaintop. Its sweet fruits, of divine fragrance and flavour, were as large as waterpots: from one branch the fruits fell on the ground, from one into the Ganges water, from two into the main trunk of the tree. The Bodhisatta, while eating the fruit with a troop of monkeys, thought, "Someday danger will come upon us owing to the fruit of this tree falling on the water"; and so, not to leave one fruit on the branch which grew over the water, he made them eat or throw down the flowers at their season from the time they were of the size of a chick-pea. But notwithstanding, one ripe fruit, unseen by the eighty thousand monkeys, hidden by an ant's nest, fell into the river, and stuck in the net above the king of Benares, who was bathing for amusement with a net above him and another below. When the king had amused himself all day and was going away in the evening, the fishermen, who were drawing the net, saw the fruit and not knowing what it was, shewed it to the king. The king asked, "What is this fruit?" "We do not know, sire." "Who will know?"The foresters, sire." He had the foresters called, and learning from them that it was a mango, he cut it with a knife, and first making the foresters eat of it, he ate of it himself  and had some of it given to his seraglio and his ministers. The flavour of the ripe mango remained pervading the king's whole body. Possessed by desire of the flavour, he asked the foresters where that tree stood, and hearing that it was on a river bank in the
[paragraph continues] Himālaya quarter, he had many rafts joined together and sailed upstream by the route shewn by the foresters. The exact account of days is not given. In due course they came to the place, and the foresters said to the king, "Sire, there is the tree." The king stopped the rafts and went on foot with a great retinue, and having a bed prepared at the foot of the tree, he lay down after eating the mango fruit and enjoying the various excellent flavours. At each side they set a guard and made a fire. When the men had fallen asleep, the Bodhisatta came at midnight with his retinue. Eighty thousand monkeys moving from branch to branch ate the mangoes. The king, waking and seeing the herd of monkeys, roused his men and calling his archers said, "Surround these monkeys that eat the mangoes so that they may not escape, and shoot them: tomorrow we will eat mangoes with monkey's flesh." The archers obeyed, saying, "Very well," and surrounding the tree stood with arrows ready. The monkeys seeing them and fearing death, as they could not escape, came to the Bodhisatta and said, "Sire, the archers stand round the tree, saying, "We will shoot those vagrant monkeys:" what are we to do?" and so stood shivering. The Bodhisatta said, "Do not fear, I will give you life;" and so comforting the herd of monkeys, he ascended a branch that rose up straight, went along another branch that stretched towards the Ganges, and springing from the end of it, he passed a hundred bow-lengths and lighted on a bush on the bank 1. Coming down, he marked the distance, saying, "That will be the distance I have come:"  and cutting a bamboo shoot at the root and stripping it, he said, "So much will be fastened to the tree, and so much will stay in the air," and so reckoned the two lengths, forgetting the part fastened on his own waist. Taking the shoot he fastened one end of it to the tree on the Ganges bank and the other to his own waist, and then cleared the space of a hundred bow-lengths with the speed of a cloud torn by the wind. From not reckoning the part fastened to his waist, he failed to reach the tree: so seizing a branch firmly with both hands he gave signal to the troop of monkeys, "Go quickly with good luck, treading on my back along the bamboo shoot." The eighty thousand monkeys escaped thus, after saluting the Bodhisatta and getting his leave. Devadatta was then a Monkey and among that herd: he said, "This is a chance for me to see the last of my enemy," so climbing up a branch he made a spring and fell on the Bodhisatta's back. The Bodhisatta's heart broke and great pain came on him. Devadatta having caused that maddening pain went away: and the Bodhisatta was alone. The king being awake saw all that was done by the monkeys and the Bodhisatta: and he lay down thinking, "This animal, not reckoning his own life, has caused the safety of his troop." When day broke, being pleased with the Bodhisatta, he thought, "It is not right to
destroy this king of the monkeys: I will bring him down by some means and take care of him:" so turning the raft down the Ganges and building a platform there, he made the Bodhisatta come down gently, and had him clothed with a yellow robe on his back and washed in Ganges water, made him drink sugared water, and had his body cleansed and anointed with oil refined a thousand times; then he put an oiled skin on a bed and making him lie there, he set himself on a low seat, and spoke the first stanza:—
What are you then to them, monkey, and what are they to you?
Hearing him, the Bodhisatta instructing the king spoke the other stanzas:—
I leapt a hundred times the length of bow outstretched that lies, I reached the tree like thunder-cloud sped by the tempest's blast; And as I hung extended there held fast by shoot and bough, Therefore I fear no pain of death, bonds do not give me pain, A parable for thee, O king, if thou the truth would’st read:
When they were filled with fear of thee and stricken sore with grief.
When I had bound a bamboo-shoot firmly around my thighs:
I lost my strength, but reached a bough: with hands I held it fast.
My monkeys passed across my back and are in safety now.
The happiness of those was won o’er whom I used to reign.
The happiness of kingdom and of army and of steed
And city must be dear to thee, if thou would’st rule indeed.
I leapt a hundred times the length of bow outstretched that lies,
I reached the tree like thunder-cloud sped by the tempest's blast;
And as I hung extended there held fast by shoot and bough,
Therefore I fear no pain of death, bonds do not give me pain,
A parable for thee, O king, if thou the truth would’st read:
 The Bodhisatta, thus instructing and teaching the king, died. The king, calling his ministers, gave orders that the monkey-king should have obsequies like a king, and he sent to the seraglio, saying, "Come to the cemetery, as retinue for the monkey-king, with red garments, and dishevelled hair, and torches in your hands."  The ministers made a funeral pile with a hundred waggon loads of timber. Having prepared the Bodhisatta's obsequies in a royal manner, they took his skull, and came to the king. The king caused a shrine to be built at the Bodhisatta's burial-place, torches to be burnt there and offerings of incense and flowers to be made; he had the skull inlaid with gold, and put in front raised on a spear-point: honouring it with incense and flowers, he put it at the king's gate when he came to Benares, and having the whole city decked out he paid honour to it for seven days. Then taking it as a relic and raising a shrine, he honoured it with incense and garlands all his life; and established in the Bodhisatta's teaching he did alms and other good deeds, and ruling his kingdom righteously became destined for heaven.
After the lesson, the Master declared the Truths and identified the Birth: "At that time the king was Ānanda, the monkey's retinue the assembly, and the monkey-king myself."
225:1 This story is figured in Cunningham's Stūpa of Bharhut, plate XXXIII, fig. 4 (explained by Mr. Tawney in Proc. As. Soc. of Bengal for Aug. 1891). Cf. Jātakamālā, no. 27 (The Great Monkey).
225:2 No. 444, vol. iv.
226:1 From the figure on the Bharhut Stūpa, it appears that he jumped across the Ganges.