The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"Service done," etc.—The Master told this tale while dwelling in Jetavana, concerning queen Mallikā. She was the daughter of the chief of the garland-makers of Sāvatthi, extremely beautiful and very good. When she was sixteen years of age, as she was going to a flower-garden with some other girls, she had three portions of sour gruel in a flower-basket. As she was leaving the town, she saw the Blessed One entering it, diffusing radiance and surrounded by the assembly of the Brethren: and she brought him the three portions of gruel.
[paragraph continues] The Master accepted, holding out his royal bowl. She saluted the Tathāgata's feet with her head, and taking her joy as subject of meditation, stood on one side. Observing her the Master smiled. The Venerable Ānanda wondered why the Tathāgata smiled and asked him the question. The Master told him the reason, "Ānanda, this girl will be to-day the chief queen of the Kosala king through the fruit of these portions of gruel." The girl went on to the flower-garden.  That very day the Kosala king fought with Ajātasattu and fled away in defeat. As he came on his horse he heard the sound of her singing, and being attracted by it he rode towards the garden. The girl's merit was ripe: so when she saw the king she came without running away, and seized at the bridle by the horse's nose. The king from horseback asked if she was married or no. Hearing that she was not, he dismounted, and being wearied with wind and sun rested for a little time in her lap: then he made her mount, and with a great army entered the town and brought her to her own house. At evening he sent a chariot and with great honour and pomp brought her from her house, set her on a heap of jewels, anointed her and made her chief queen. From that time onward she was the dear, beloved and devoted wife of the king, possessed of faithful servants and the five feminine charms: and she was a favourite of the Buddhas. It became noised abroad through the whole city that she had attained such prosperity because she had given the three portions of gruel to the Master.
One day they began a discussion in the Hall of Truth: "Sirs, queen Mallikā gave three portions of gruel to the Buddhas, and as the fruit of that, on the very same day she was anointed queen: great indeed is the virtue of Buddhas." The Master came, asked and was told the subject of the Brethren's talk: he said, "It is not strange, Brethren, that Mallikā has become chief queen of the Kosala king by giving three portions of gruel to the omniscient Buddha alone: for why? It is because of the great virtue of Buddhas: wise men of old gave gruel without salt or oil to paccekabuddhas, and owing to that attained in their next birth the glory of being kings in Kāsi, three hundred leagues in extent": and so he told the tale of old.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta was born in a poor family: when he grew up he made a living by working for wages with a certain rich man. One day he got four portions of sour gruel from a shop, thinking, "This will do for my breakfast," and so went on to his farming-work. Seeing four paccekabuddhas coming towards Benares to collect alms, he thought, "I have these four portions of gruel,  what if I were to give them to these men who are coming to Benares for alms?" So he came up and saluting them said, "Sirs, I have these four portions of gruel in hand: I offer them to you: pray accept them, good sirs, and so I shall gain merit to my lasting good and welfare." Seeing that they accepted, he spread sand and arranged four seats and strewed broken branches on them: then he set the paccekabuddhas in order; bringing water in a leaf-basket, he poured the water of donation, and then set the four portions of gruel in four bowls with salutation and the words, "Sirs, in consequence of these may I not be born in a poor family; may this be the cause of my attaining omniscience." The paccekabuddhas ate and then gave thanks and departed to the Nandamūla cave. The Bodhisatta, as he saluted, felt the joy of association with paccekabuddhas, and after they had departed
from his sight and he had gone to his work, he remembered them always till his death: as the fruit of this, he was born in the womb of the chief queen of Benares. His name was called prince Brahmadatta. From the time of his being able to walk alone, he saw clearly by the power of recollecting all that he had done in former births, like the reflexion of his own face in a clear mirror, that he was now born in that state because he had given four portions of gruel to the paccekabuddhas when he was a servant and going to work in that same city. When he grew up he learned all the arts at Takkasilā: on his return his father was pleased with the accomplishments he displayed, and appointed him viceroy: afterwards, on his father's death, he was established in the kingdom. Then he married the exceedingly beautiful daughter of the Kosala king, and made her his chief queen. On the day of his parasol-festival they decorated the whole city as if it were a city of the gods. He went round the city in procession;  then he ascended the palace, which was decorated, and on the dais mounted a throne with the white parasol erected on it; sitting there he looked down on all those that stood in attendance, on one side the ministers, on another the brahmins and householders resplendent in the beauty of varied apparel, on another the townspeople with various gifts in their hands, on another troops of dancing-girls to the number of sixteen thousand like a gathering of the nymphs of heaven in full apparel. Looking on all this entrancing splendour he remembered his former estate and thought, "This white parasol with golden garland and plinth of massive gold, these many thousand elephants and chariots, my great territory full of jewels and pearls, teeming with wealth and grain of all kinds, these women like the nymphs of heaven, and all this splendour, which is mine alone, is due only to an alms-gift of four portions of gruel given to four paccekabuddhas: I have gained all this through them ": and so remembering the excellence of the paccekabuddhas he plainly declared his own former action of merit. As he thought of it his whole body was filled with delight. Delight melted his heart and amid the multitude he uttered two stanzas of joyous song:—
Elephant and horse and kine,
Ne’er, they say, is reckoned cheap:
Alms of gruel, saltless, dry,
Bring me this reward to reap.
Gold and corn and all the land,
Troops of girls with form divine:
Alms have brought them to my hand.
Elephant and horse and kine,
 So the Bodhisatta in his joy and delight on the day of his parasol-ceremony sang the song of joy in two stanzas. From that time onward they were called the king's favourite song, and all sung them—the Bodhisatta's dancing girls, his other dancers and musicians, his people in the palace, the townsfolk and those in ministerial circles.
 After a long time had passed, the chief queen became anxious to know the meaning of the song, but she durst not ask the Great Being. One day the king was pleased with some quality of hers and said, "Lady, I will give you a boon; accept a boon." "It is well, O king, I accept." "What shall I give you, elephants, horses or the like?" "O king, through your grace I lack nothing, I have no need of such things: but if you wish to give me a boon, give it by telling me the meaning of your song." "Lady, what need have you of that boon? Accept something else." "O king, I have no need of anything else: it is that I will accept." "Well, lady, I will tell it, but not as a secret to you alone: I will send a drum round the whole twelve leagues of Benares, I will make a jewelled pavilion at my palace-door and arrange there a jewelled throne: on it I will sit amidst ministers, brahmins and other people of the city, and the sixteen thousand women, and there tell the tale." She agreed. The king had all done as he said, and then sat on the throne amidst a great multitude, like Sakka amidst the company of the gods. The queen too with all her ornaments set a golden chair of ceremony and sat in an appropriate place on one side, and looking with a side glance she said, "O king, tell and explain to me, as if causing the moon to arise in the sky, the meaning of the song of joy you sang in your delight"; and so she spoke the third stanza:—
Many a time the song you sing,
In exceeding joy of heart:
Pray to me the cause impart.
 The Great Being declaring the meaning of the song spoke four stanzas:—
Going from the town to labour four ascetics once I saw, All my thoughts went to those Buddhas: as they sat beneath the tree, Such the virtuous deed of merit: lo! the fruit I reap to-day
Servant was I to another, hireling, but of honest worth.
Passionless and calm in bearing, perfect in the moral law.
With my hands I brought them gruel, offering of piety.
All the kingly state and riches, all the land beneath my sway.
Going from the town to labour four ascetics once I saw,
All my thoughts went to those Buddhas: as they sat beneath the tree,
Such the virtuous deed of merit: lo! the fruit I reap to-day
 When she heard the Great Being thus fully explaining the fruit of his action, the queen said joyfully, "Great king, if you discern so visibly the fruits of charitable giving, from this day forward take a portion of rice and do not eat yourself until you have given it to righteous priests and brahmins"; and she spoke a stanza in praise of the Bodhisatta:—
Set the wheel of right to roll:
Flee injustice, mighty king,
Righteously thy realm control.
The Great Being, accepting what she said, spoke a stanza:—
Walking in the path of right,
Where the good, fair queen, have gone:
Saints are pleasant to my sight.
 After saying this, he looked at the queen's beauty and said, "Fair lady, I have told fully my good deeds done in former time, but amongst all these ladies there is none like you in beauty or charming grace: by what deed did you attain this beauty?" And he spoke a stanza:—
You the crowd of maids outshine:
For what gracious deed was given
Meed of beauty so divine?
Then she told the virtuous deed done in her former birth, and spoke the last two stanzas:—
In a begging Brother's bowl
At Ambaṭṭha's royal court,
To modesty my heart I gave,
To virtue and to good report.
Once an alms of rice I put;
Charity had filled my soul:
Such the deed, and lo! the fruit.
In a begging Brother's bowl
She too, it is said, spoke with accurate knowledge and remembrance of past births.
 So both fully declared their past deeds, and from that day they had six halls of charity built, at the four gates, in the centre of the city and at the palace-door, and stirring up all India they gave great gifts, kept the moral duties and the holy days, and at the end of their lives became destined for heaven.
At the end of the lesson, the Master identified the birth: "At that time the queen was the mother of Rāhula, and the king was myself."
244:1 Compare Jātakamālā No. 3, Kathāsaritsāgara No. xxvii. 79.