The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"In guise of joy."--This story was told by the Master while at Kuṇḍadhānavana near the city of Kuṇḍiya about Suppavāsā, a lay-sister, who was daughter to King Koliya. For at that time, she, who had carried a child seven years in her womb, was in the seventh day of her throes, and her pains were grievous. In spite of all her agony, she thought as follows:--"All-Enlightened is the Blessed One who preaches the Truth to the end that such suffering may cease; righteous are the Elect of the Blessed One who so walk that such suffering may cease; blessed is Nirvana wherein such suffering cloth cease." These three thoughts were her consolation in her pangs. And she sent her husband to the Buddha to tell her state and bear a greeting for her.
Her message was given to the Blessed One, who said,  "May Suppavāsā, daughter of the king of the Koliyas, grow strong and well again, and bear a healthy child." And at the word of the Blessed One, Suppavāsā, daughter of the king of the Koliyas, became well and strong, and bore a healthy child. Finding on his return that his wife had been safely delivered, the husband marvelled greatly at the exalted powers of the Buddha. Now that her child was born, Suppavāsā was eager to show bounty for seven days to the Brotherhood with the Buddha at its head, and sent her husband back to invite them. Now it chanced that at that time the Brotherhood with the Buddha at its head had received an invitation from the layman who supported the Elder Moggallāna the Great; but the Master, wishing to gratify Suppavāsā's charitable desires, sent to the Elder to explain the matter, and with the Brotherhood accepted for seven days the hospitality of Suppavāsā. On the seventh day she dressed up her little boy, whose name was Sīvali, and made him bow before the Buddha and the Brotherhood. And when he was brought in due course to Sāriputta, the Elder in all kindness greeted the infant, saying, "Well, Sīvali, is all well with you?" "How could it be, sir?" said the infant. "Seven long years have I had to wallow in blood."
Then in joy Suppavāsā exclaimed, "My child, only seven days old, is actually discoursing on religion with the apostle Sāriputta, the Captain of the Faith?"
"Would you like another such a child?" asked the Master. "Yes, sir;" said Suppavāsā, "seven more, if I could have them like him." In solemn phrase the Master gave thanks for Suppavāsā's hospitality and departed.
At seven years of age the child Sīvali gave his heart to the Faith and forsook the world to join the Brotherhood; at twenty he was admitted a full Brother. Righteous was he and won the crown of righteousness which is Arahatship, and the earth shouted aloud for joy.
So one day the assembled Brethren talked with one another in the Hall of Truth respecting the matter, saying, "The Elder Sīvali, who is now so shining a light, was the child of many prayers; seven long years was he in the womb and seven days in birth. How great must have been the pains of mother and child! Of what deeds were their pains the fruit?"
Entering the hall, the Master asked the subject of their discourse. "Brethren," said he, "the righteous Sīvali  was seven years in the womb and seven days in birth all because of his own past deeds. And similarly Suppavāsā's seven years' pregnancy and seven days' travail resulted from her own past deeds." So saying, he told this story of the past.
Once on a time when Brahmadatta was reigning in Benares, the Bodhisatta was the child of the queen-consort, and grew up and was educated at Takkasilā, and at his father's death became king and ruled righteously. Now in those days the King of Kosala came up with a great force against Benares and slew the king and bore off his queen to be his own wife.
When the king was slain, his son made his escape through the sewer. Afterwards he collected a mighty force and came to Benares. Encamping hard by, he sent a message to the king to either surrender the kingdom or give battle. And the king sent back the answer that he would give battle. But the mother of the young prince, hearing of this, sent a message to her son, saying, "There is no need to do battle. Let every approach to the city on every side be invested and barred, till lack of firewood and water and food wears out the people. Then the city will fall into your hands without any fighting." Following his mother's advice, the prince for seven days invested the city with so close a blockade that the citizens on the seventh day cut off their king's head and brought it to the prince. Then he entered the city and made himself king, and when his life ended he passed away to fare according to his deserts.
The result and consequence of his acts in blockading the city for those seven days was that for seven years he abode in the womb and was seven days in birth. But, inasmuch as he had fallen at the feet of the Buddha Padumuttara and had prayed with many gifts that the crown of Arahatship might be his; and, inasmuch as, in the days of the Buddha Vipassī, he had offered up the same prayer, he and his townsfolk, with gifts of great price;-- therefore, by his merit, he won the crown of Arahatship. And because Suppavāsā sent the message bidding her son take the city by blockade, she was doomed to a seven years' pregnancy and to a seven days' travail.
His story ended, the Master, as Buddha, repeated these verses:--
And when he had taught this lesson, the Master identified the Birth by saying, "Sīvali was the prince who in those days blockaded the city, and became king; Suppavāsā was his mother, and I his father, the king of Benares."