The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"Kindness as much," etc.—This story was told by the Master while dwelling at Jetavana, about the ingratitude of Devadatta.
He ended it by saying, "Not only now, but in former days did Devadatta show ingratitude," and with these words he told a story of the past.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta came to life as a woodpecker in the Himālaya country.
 Now a certain lion, while devouring his prey, had a bone stick in his throat. His throat swelled up so that he could not take any food and severe pains set in. Then this woodpecker, while intent on seeking its own food, as it was perched on a bough, saw the lion and asked him, saying, "Friend, what ails you?" He told him what was the matter, and the bird said, "I would take the bone out of your throat, friend, but I dare not put my head into your mouth, for fear you should eat me up."
"Do not be afraid, friend; I will not eat you up. Only save my life."
"All right," said the bird, and ordered the lion to lie down upon his side. Then it thought: "Who knows what this fellow will be about?" And to prevent his closing his mouth, it fixed a stick between his upper and lower jaw, and then putting its head into the lion's mouth, it struck the end of the bone with its beak. The bone fell out and disappeared. And then the woodpecker drew out its head from the lion's mouth, and with a blow from its beak knocked out the stick, and hopping off sat on the top of a bough.
The lion recovered from his sickness, and one day was devouring a wild buffalo which he had killed. Thought the woodpecker: "I will now put him to the test," and perching on a bough above the lion's head, it fell to conversing with him and uttered the first stanza:
To thee, my lord, we once did show:
On us in turn, we humbly pray,
Do thou a trifling boon bestow.
On hearing this the lion repeated the second stanza:
A creature red in tooth and claw,
To dare such a deed and be living still,
Is token enough of my good will.
The woodpecker on hearing this uttered two more stanzas
The due requital of good service done; 
From bitter thought and angry word refrain,
But haste the presence of the wretch to shun.
With these words the woodpecker flew away.
The Master, his lesson ended, identified the Birth: "At that time Devadatta was the Lion, and I myself was the Woodpecker."
17:1 Compare Tibetan Tales, xxvii. p. 311: "The Ungrateful Lion."Æsop: "The Wolf and the Crane." Jātakamālā, No. 34: "The Woodpecker."