The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
 "Goats are stupid," etc.—The Master told this tale in Jetavana, concerning temptation of a Brother by his former wife. When the Brother confessed that he was longing for the world, the Master said, "Brother, this woman does you harm: formerly also you came into the fire through her and were saved from death by sages," so he told an old tale.
Once upon a time when a king named Senaka was reigning in Benares, the Bodhisatta was Sakka. The king Senaka was friendly with a certain nāga-king. This nāga-king, they say, left the nāga-world and ranged the
earth seeking food. The village boys seeing him said, "This is a snake," and struck him with clods and other things. The king, going to amuse himself in his garden, saw them, and being told they were beating a snake, said, "Don't let them beat him, drive them away "; and this was done. So the nāga-king got his life, and when he went back to the nāga-world, he took many jewels, and coming at midnight to the king's bedchamber he gave them to him, saying, "I got my life through you": so he made friendship with the king and came again and again to see him. He appointed one of his nāga girls, insatiate in pleasures, to be near the king and protect him: and he gave the king a charm, saying, "If ever you do not see her, repeat this charm." One day the king went to the garden with the nāga girl and was amusing himself in the lotus-tank. The nāga girl seeing a water-snake quitted her human shape and made love with him. The king not seeing the girl said,  "Where is she gone?" and repeated the spell: then he saw her in her misconduct and struck her with a piece of bamboo. She went in anger to the nāga-world, and when she was asked, "Why are you come?" she said, "Your friend struck me on the back because I did not do his bidding," shewing the mark of the blow. The nāga-king, not knowing the truth, called four nāga youths and sent them with orders to enter Senaka's bed chamber and destroy him like chaff by the breath of their nostrils. They entered the chamber at the royal bed-time. As they came in, the king was saying to the queen: "Lady, do you know where the nāga-girl has gone?" "King, I do not." "To-day when we were bathing in the tank, she quitted her shape and misconducted herself with a water-snake: I said, "Don't do that," and struck her with a piece of bamboo to give her a lesson: and now I fear she may have gone to the nāga-world and told some lie to my friend, destroying his good-will to me." The young nāgas hearing this turned back at once to the nāga-world and told their king. He being moved went instantly to the king's chamber, told him all and was forgiven: then be said, "In this way I make amends," and gave the king a charm giving knowledge of all sounds: "This, O king, is a priceless spell: if you give anyone this spell you will at once enter the fire and die." The king said, "It is well," and accepted it. From that time he understood the voice even of ants. One day he was sitting on the dais eating solid food with honey and molasses: and a drop of honey, a drop of molasses, and a morsel of cake fell on the ground. An ant seeing this comes crying, "The king's honey jar is broken on the dais, his molasses-cart  and cake-cart are upset; come and eat honey and molasses and cake." The king hearing the cry laughed. The queen being near him thought, "What has the king seen that he laughs?" When the king had eaten his solid food and bathed and sat down cross-legged, a fly said to his wife, "Come, lady, let us enjoy love." She said, "Excuse me for a little, husband: they
will soon be bringing perfumes to the king; as he perfumes himself some powder will fall at his feet: I will stay there and become fragrant, then we will enjoy ourselves lying on the king's back." The king hearing the voice laughed again. The queen thought again, "What has he seen that he laughs?" Again when the king was eating his supper, a lump of rice fell on the ground. The ants cried, "A wagon of rice has broken in the king's palace, and there is none to eat it." The king hearing this laughed again. The queen took a golden spoon and helping him reflected, "Is it at the sight of me that the king laughs?" She went to the bed-chamber with the king and at bed-time she asked, "Why did you laugh, O king?" He said, "What have you to do with why I laugh?" but being asked again and again he told her. Then she said, "Give me your spell of knowledge." He said, "It cannot be given": but though repulsed she pressed him again.
The king said, "If I give you this spell, I shall die." "Even though you die, give it me." The king, being in the power of womankind, saying, "It is well," consented and went to the park in a chariot, saying, "I shall enter the fire after giving away this spell." At that moment, Sakka, king of gods, looked down on the earth and seeing this case said, "This foolish king, knowing that he will enter the fire through womankind, is on his way; I will give him his life ": so he took Sujā, daughter of the Asuras, and went to Benares.  He became a he-goat and made her a she-goat, and resolving that the people should not see them, he stood before the king's chariot. The king and the Sindh asses yoked in the chariot saw him, but none else saw him. For the sake of starting talk he was as if making love with the she-goat. One of the Sindh asses yoked in the chariot seeing him said, "Friend goat, we have heard before, but not seen, that goats are stupid and shameless: but you are doing, with all of us looking on, this thing that should be done in secret and in a private place, and are not ashamed: what we have heard before agrees with this that we see:" and so he spoke the first stanza:
This one knows not he's parading what in secret he should do.
The goat hearing him spoke two stanzas:
When you're loosed, you don't escape, Sir, that's a stupid habit too:
You're tied with ropes, your jaw is wrenched, and very downcast is your eye.
And that Senaka you carry, he's more stupid still than you.
When you're loosed, you don't escape, Sir, that's a stupid habit too:
 The king understood the talk of both animals, and hearing it he quickly sent away the chariot. The ass hearing the goat's talk spoke the fourth stanza:
But how Senaka is stupid, prithee do explain to me.
The goat explaining this spoke the fifth stanza:
Cannot keep her faithful ever and his life he must betray.
The king hearing his words said, "King of goats, you will surely act for my advantage: tell me now what is right for me to do." Then the goat said, "King, to all animals no one is dearer than self: it is not good  to destroy oneself and abandon the honour one has gained for the sake of anything that is dear": so he spoke the sixth stanza:—
And yet renounced it if his life's the cost:
Life is the chief thing: what can man seek higher?
If life's secured, desires need ne’er be crossed.
So the Bodhisatta exhorted the king. The king, delighted, asked, "King of goats, whence come you?" "I am Sakka, O king, come to save you from death out of pity for you." "King of gods, I promised to give her the charm: what am I to do now?" "There is no need for the ruin of both of you: you say, "It is the way of the craft," and have her beaten with some blows: by this means she will not get it." The king said, "It is well," and agreed. The Bodhisatta after exhortation to the king went to Sakka's heaven. The king went to the garden, had the queen summoned and then said, "Lady, will you have the charm?" "Yes, lord." "Then go through the usual custom." "What custom?" "A hundred stripes  on the back, but you must not make a sound." She consented through greed for the charm. The king made his slaves take whips and beat her on both sides. She endured two or three stripes and then cried, "I don't want the charm." The king said, "You would have killed me to get the charm," and so flogging the skin off her back he sent her away. After that she could not bear to talk of it again.
At the end of the lesson the Master declared the Truths, and identified the Birth:—at the end of the Truths, the Brother was established in the First Path:—"At that time the king was the discontented brother, the queen his former wife, the steed Sāriputta, and Sakka was myself."
174:1 For variants on this story see Benfey in Orient and Occident, vol. ii. pp. 133 ff., and the second story in the Arabian Nights.