The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
 "Plenty of water," etc.--This story the Master told in his sojourn at Veḷuvana, about Devadatta. One day it happened that the Brethren were talking in the Hall of Truth about Devadatta's ingratitude and treachery to his friends, when the Master broke in, "Not this once only, Brethren, has Devadatta been ungrateful and treacherous to his own friends. He was just the same before." Then he told them an old story.
Once upon a time, when Brahmadatta was king of Benares, the Bodhisatta was born into a brahmin family in a certain Kāsi village, and when he grew of age, married and settled down. Now in those clays there was a certain deep well by the highway in Kāsi-land, which had no way
down to it. The people who passed by that way, to win merit, used to draw water by a long rope and a bucket, and fill a trough for the animals; thus they gave the animals water to drink. All around lay a mighty forest, wherein troops of monkeys dwelt.
It happened by a chance that for two or three days the supply of water ceased which wayfarers used to draw; and the creatures could get nothing to drink. A Monkey, tormented with thirst, walked up and down by the well looking for water.
Now the Bodhisatta came that way on some errand, drew water for himself, drank it, and washed his hands; then he noticed our Monkey. Seeing how thirsty he was, the traveller drew water from the well and filled the trough for him. Then he sat down under a tree, to see what the creature would do.
The Monkey drank, sat down near, and pulled a monkey-grimace, to frighten the Bodhisatta. "Ah, you bad monkey!" said he, at this--"when you were thirsty and miserable,  I gave you plenty of water; and now you make monkey-faces at me. Well, well, help a rascal and you waste your pains." And he repeated the first stanza:
Then this spite-friend monkey replied, "I suppose you think that's all I can do. Now I'll drop something on your head before I go." Then, repeating the second stanza, he went on--
As soon as he heard this the Bodhisatta got up to go. But at the very instant this Monkey from the branch where he sat dropt it like a festoon upon his head; and then made off into the forest shrieking. The Bodhisatta washed, and went his way.
 When the Master had ended this discourse, after ṣaying "It is not only now that Devadatta is so, but in former days also he would not acknowledge a kindness which I showed him," he identified the Birth: "Devadatta was the Monkey then, and the brahmin was I myself."
48:1 Gotama Buddha's son.