The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"Robber, arise," etc.—The Master, while dwelling in the Bamboo-Grove, told this story about the venerable Moggallāna.
When that elder was living near Rājagaha in a forest hut, a certain robber, after breaking into a house in a suburban village, fled with his hands full of plunder till he came within the precincts of the elder's cell, and thinking that he should be safe there he lay down at the entrance of his hut of leaves. The elder noticed him lying there and suspecting his character said to himself, "It would be wrong for me to have any dealings with a robber." So coming out of his hut he told him not to lie there, and drove him away.
The robber starting off fled with the greatest haste. And men with torches in their hands, following close upon the robber's track, came and saw the various spots marked by the presence of the robber and said, "It was this way the robber came. Here is where he stood. There he sat down. And that is the way he fled. He is not to be seen here." So they rushed about hither and thither, but at last had to return without finding him. On the next day early in the morning the elder went his round for alms in Rājagaha, and on coming back from his pilgrimage he went to the Bamboo-Grove and told the Master what had happened. The Master said, "You are not the only one, Moggallāna, to suspect in a case in which suspicion is justified. Wise men of old suspected in like manner." And at the request of the elder he told a story of bygone times.
 Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta came to life as a Nimb-tree spirit in a cemetery grove of that city. Now one day a robber having been guilty of an act of theft in an outlying hamlet of the city entered the cemetery grove. And at this time two old trees stood there, a Nimb-tree and a Bo-tree. The robber placed his stolen goods at the foot of this Nimb-tree and lay down there.
[paragraph continues] Now in these days robbers that were caught were put to torture by being impaled on a stake of the Nimb-tree. So the spirit of the Nimb-tree thought: "If people should come and capture this robber, they will cut off a branch and make a stake from this Nimb-tree and impale him on it. And in that case the tree will be destroyed. So I will drive the fellow away." Then addressing him, he repeated the first stanza:—
The king's men are upon thee, the avengers of thy crime.
Moreover he added these words, "Get you gone, before the king's men take you." Thus did he frighten the robber away. And no sooner had he fled than the deity of the Bo-tree repeated the second stanza:—
To thee, O Nimb-tree, woodland sprite, what difference would it make?
The deity of the Nimb-tree on hearing this uttered the third stanza:—
I would not have the king's men find that wicked robber here.
They from my sacred tree, I know, straightway a branch would take,
And to requite the guilty wretch, impale him on a stake.
 And while the two sylvan deities were thus conversing together, the owners of the property, following on the trail of the robber, with torches in their hand, when they saw the place where he had been lying down said, "Lo! the robber has just risen up and fled from this place. We have not got him yet, but if we do, we will come back and either impale him at the foot of this Nimb-tree, or hang him from one of its branches."
And with these words rushing about hither and thither, and not finding the robber, they made off. And on hearing what they said the spirit of the Bo-tree uttered the fourth stanza
The wise e’en in this present world look to a future state.
The Master, when he had brought this lesson to an end, identified the Birth:
"At that time Sāriputta was the Spirit of the Bo-tree. I myself was the Nimb-tree Spirit."