The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
"This sorry draught," etc.--This story the Master told whilst at Jetavana, about five hundred persons who ate broken meat.
At Sāvatthi, we learn, were five hundred persons who had left the stumbling-block of a worldly life to their sons and daughters,  and lived all together sitting under the Master's preaching. Of these, some were in the First Path, some in the Second, some in the Third: not a single one but had embraced salvation. They that invited the Master invited these also. But they had five hundred pages waiting upon them, to bring them toothbrushes, mouth-water, and garlands of flowers; these lads used to eat their broken meat. After their meal, and a nap, they used to run down to the Aciravatī, and on the river bank they would wrestle like very Mallians 2, shouting all the time. But the five hundred lay brethren were quiet, made very little noise, courted solitude.
The Master happened to hear the pages shouting. "What is that noise, Ānanda?" he asked. "The pages, who eat the broken meat," was the reply. The Master said: "Ānanda, this is not the only time these pages have fed on broken meat, and made a great noise after it; they used to do the same in the olden days; and then too these lay brethren were just as quiet as they are now." So saying, at his request, the Master told a story of the past.
Once upon a time, when Brahmadatta was king of Benares, the Bodhisatta was born as the son of one of his courtiers, and became the king's adviser in all things both temporal and spiritual. Word came to the king of a revolt on the frontier. He ordered five hundred chargers to he got ready, and an army complete in its four parts 1. With this he set out, and quelled the rising, after which he returned to Benares.
When he came home, he gave order, "As the horses are tired, let them have some juicy food, some grape juice to drink." The steeds took this delicious drink, then retired to their stables and stood quietly each in his stall.
But there was a mass of leavings, with nearly all the goodness squeezed out of it. The keepers asked the king what to do with that. "Knead it up with water," was his command, "strain through a towel, and give it to the donkeys who carry the horses' provender." This wretched stuff the donkeys drank up. It maddened them, and they galloped about the palace yard braying loudly.
From an open window the king saw the Bodhisatta, and called out to him.  "Look there! how mad these donkeys are from that sorry drink! how they bray, how they caper! But those fine thorobreds that drank the strong liquor, they make no noise; they are perfectly quiet, and jump not at all. What is the meaning of this?" and he repeated the first stanza:
And the Bodhisatta explained the matter in the second stanza:--
When the king had listened to the Bodhisatta's answer, he had the donkeys driven out of his courtyard. Then, abiding by the Bodhisatta's
advice, he alms and did good until he passed away to fare according to his deserts.
When this discourse was ended, the Master identified the Birth as follows:--"At that time these pages were the five hundred asses, these lay brethren were the five hundred thorobreds, Ānanda was the king, and the wise courtier was I myself."
65:1 The introductory story is varied in Dhammapada, Comm. p. 274.
65:2 The Mallians were a tribe of professional wrestlers.
66:1 Elephants, horse, chariots, infantry.
66:2 Dhammapada, p. 275.