Once a poor village doctor saw some boys playing near a tree, in the hollow of which lived a snake. Hoping to make some money, he asked one of the boys, who was the Bodhisatta, to put his hand into the hollow of the tree, saying that a hedgehog lived there. The boy did so, but, feeling the snake, with great presence of mind, he seized it firmly by the neck and flung it away from him. The snake fell on the doctor and bit him so severely that he died. The boys were brought before the king and charged, but on hearing the Bodhisatta's explanation the king released them.
The story was related to show how the Bodhisatta practised paññāpāramitā. Ananda is identified with the king. J.iii.204ff.