The king of Benares had a son called Dutthakumára, who was hated by everyone. One day, when he was bathing in the river, a storm came on, and he ordered his servants to take him into the middle of the river and there bathe him. The servants thereupon flung him into the water and reported to the king that he was lost. As he was swept along on the stream, he caught hold of a tree trunk, and on to this tree trunk there came to cling, also, a snake, a rat, and a parrot, who had all lost their dwelling places in the storm. The Bodhisatta, who was an ascetic living on the bank of the river, rescued Duttha and his companions and looked after them. When they bade him farewell, the snake said that he had forty crores hidden in a certain spot, and the ascetic had only to ask for these and they were hits. The rat had thirty crores, also at the ascetic's disposal; the parrot promised the ascetic wagonloads of rice; and Duttha promised to provide him with the four requisites. In his heart, however, he hated the ascetic for an imaginary slight, and vowed vengeance.
After Duttha became king, the ascetic wished to test the faith of his former guests. He went to the snake and called out his name, and the snake at once appeared, offering his treasure. The rat and the parrot did likewise, but Duttha, riding in a procession and seeing him from afar, gave orders that the ascetic should be beaten and put to death. On his way to the place of execution the ascetic kept on repeating: "They knew the world who framed this proverb true: a log pays better salvage than some men!" When asked what these words meant, he related the whole story.
The enraged citizens, seizing Duttha, put him to death and made the ascetic king. Later, he brought the snake, the rat, and the parrot to the palace and looked after them.
The story was told in reference to Devadatta's attempts to kill the Buddha. Devadatta is identified with Duttha, the snake with Sáriputta, the rat with Moggallána, and the parrot with Ananda. J.i.322 7.