The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
"Five score black elephants," etc.--This story the Master told at Jetavana, about arbitrary giving of alms.
We hear that at Sāvatthi, a family used sometimes to give alms to the Buddha and his friends, sometimes they used to give to the heretics, or else the givers would form themselves into companies, or again the people of one street would club together, or the whole of the inhabitants would collect voluntary offerings, and present them.
On this occasion all the inhabitants had made such a collection of all necessaries; but counsels were divided, some demanding that this be given to the heretics, some speaking for those who followed the Buddha. Each party stuck to their point, the disciples of the heretics voting for the heretics, and the disciples of Buddha for Buddha's company. Then it was proposed to divide upon the question, and accordingly they divided; those who were for the Buddha were in the majority.
So their plan was followed, and the disciples of the heretics could not prevent the gifts being offered to the Buddha and his followers.
The citizens gave invitation to the Buddha's company; for seven days they set rich offerings before them, and on the seventh gave over all the articles they had collected. The Master returned thanks,  after which he instructed a host of people in the fruition of the Paths. Next he returned to Jetavana; and when his followers had done their duties, he delivered a Buddha's discourse standing before his scented chamber, into which he then retired.
At evening time the Brethren talked the matter over together in the Hall of Truth: "Friend, how the heretics' disciples tried to prevent this from coming to the saints! Yet they couldn't do it; all the collection of articles was laid before the saints' own feet. Ah, how great is the Buddha's power!" "What is this you are talking about now together?" asked the Master, coming in. They told him. "Brethren," said he, "this is not the first time that the disciples of the heretics have tried to thwart an offering which should have been made to me. They did the sane before; but always these articles have been finally laid at my feet." So saying, he told them a tale of long ago.
Once upon a time there lived in Benares a king Susīma; and the Bodhisatta was the son of his chaplain's lady. When he was sixteen years old, his father died. The father while he lived was Master of the Ceremonies in the king's elephant festivals. He alone had right to all the trappings and appointments of the elephants which came into the place of festival. By this means he gained as much as ten millions at each festival.
At the time of our story the season for an elephant festival came round. And the Brahmins all flocked to the king, with these words: "O great king! the season for an elephant festival has come, and a festival should be made. But this your chaplain's son is very young; he knows neither the three Vedas nor the lore of elephants 1. Shall we conduct the ceremony?" To this the king consented.
Off went the Brahmins delighted. "Aha," said they, "we have barred this lad from performing the festival. We shall do it ourselves, and keep the gains!"
But the Bodhisatta's mother heard that in four days there was to be an elephant festival.  "For seven generations," thought she, "we have managed the elephant festivals from father to son. The old custom will pass from us, and our wealth will all melt away!" She wept and wailed. "Why are you weeping?" asked her son. She told him. Said he--"Well, mother, shall I conduct the festival?" "What, you, sonny? You don't know the three Vedas or the elephant lore; how can you do it?" "When are they going to have the festival, mother?" "Four days from now, my son." "Where can I find teachers who know the three Vedas by heart, and all the elephant lore?" "Just such a famous teacher, my son, lives in Takkasilā, in the realm of Gandhāra, two thousand leagues away." "Mother," says he, "our hereditary right we shall not lose. One day will take me to Takkasilā; one night will be enough to teach me the three Vedas and the elephant lore; on the morrow I will journey home; and on the fourth day I will manage the elephant festival. Weep no more!" With these words he comforted his mother.
Early next morning he broke his fast, and set out all alone for Takkasilā, which he reached in a single day. Then seeking out the teacher, he greeted him and sat on one side.
"Where have you come from?" the teacher asked.
"From Benares, Teacher."
"To what end?"
"To learn from you the three Vedas and the elephant lore."
"Certainly, my son, you shall learn it."
"But, Sir," said our Bodhisatta, "my case is urgent." Then he recounted the whole matter, adding, "In a single day I have traversed a journey of two thousand leagues. Give me your time for this one night only. Three days from now there is to be an Elephant festival; I will learn the whole after one lesson."
The Teacher consented. Then the lad washed his master's feet, and laid before him a fee of a thousand pieces of money;  he sat down on one side, and learnt his lesson by heart; as day broke, even as the day broke, he finished the three Vedas and the Elephant Lore. "Is there any more, Sir?" asked he. "No, my son, you have it all." "Sir," he went on, "in this book such a verse comes in too late, such another has gone astray in the reading. This is the way to teach your pupils for the future," and then he corrected his teacher's knowledge for him.
After an early meal he took his leave, and in a single day he was back again in Benares, and greeting his mother. "Have you learnt your lesson, my boy?" said she. He answered, yes; and she was delighted to hear it.
Next day, the festival of the elephants was prepared. A hundred elephants were set in array, with golden trappings, golden flags, all covered with a network of fine gold; and all the palace courtyard was decked out. There stood the Brahmins, in all their fine gala dress, thinking to themselves, "Now we shall do the ceremony, we shall do it!" Presently came the king, in all his splendour, and with him the ornaments and other things that were used.
The Bodhisatta, apparelled like a prince, at the head of his suite, approached the king with these words.
"Is it really true, O great king, that you are going to rob me of my right? Are you going to give other brahmins the managing of this ceremony? Have you said that you mean to give them the various ornaments and vessels that are used?" and he repeated the first stanza as follows:
 King Susīma, thus addressed, then repeated the second stanza:--
Then a thought struck the Bodhisatta; and he said, "Sire, if you do remember my ancient right and your ancient custom, why do you neglect me and make others the masters of your festival?" "Why, I
was told that you did not know the three Vedas or the Elephant Lore, and that is why I have caused the festival to be managed by others." "Very well, Sire. If there is one amongst all these brahmins who can recite a portion of the Vedas or the Elephant Lore against me, let him stand forward! Not in all India is there one save me who knows the three Vedas and the Elephant Lore for the ordering of an Elephant festival!"  Proud as a lion's roar rang out the answer! Not a brahmin durst rise and contend with him. So the Bodhisatta kept his ancestral right, and conducted the ceremony; and laden with riches, he returned to his own home.
When the Master had ended this discourse, he declared the Truths, and identified the Birth:--some entered on the First Path, some on the Second, some the Third, and some the Fourth:--"Mahāmāyā was at that time my mother, king Suddhodana was my father, Ānanda was king Susīma, Sāriputta the famous Teacher and I myself was the young Brahmin."
32:1 An elephant trainer's manual, the hastisūtram or hastiçikṣā, cf. Mallinātha, Raghuv. vi. 27.