The Bodhisatta was once a frog. A water snake out feeding came upon a wicker fish trap and crawled in expecting an easy meal. But the fish attacked the snake, biting him until he crawled out covered in blood and lay at the edge of the water. Just then the Bodhisatta took a long leap and accidentally landed in the trap. The snake asked him whether he approved of the fish’s behavior or not. He answered that since the snake ate fish when they went to his place it was certainly appropriate that they eat him when he went to theirs. Hearing this approval from the Bodhisatta, the fish left the trap and killed the snake, then they swam away.
In the Lifetime of the Buddha
The snake was an earlier birth of King Ajatasattu, who was a devoted supporter of Devadatta, a disciple of the Buddha who became his nemesis. At the insistence of Devadatta, Ajatasattu had murdered his own father because he was a supporter of the Buddha. Soon after this, Ajatasattu’s mother, the queen, died of grief. Ajatasattu’s uncle, King Pasenadi, the righteous ruler of the adjacent realm and a devoted supporter of the Buddha, was full of hatred for Ajatasattu. King Pasenadi wanted to take back a village that had been part of the dowry given with his sister when she married Ajatasattu’s father, so he started a war with Ajatasattu. Whenever Ajatasattu won a battle he marched triumphantly back to the capital city, but when he lost a battle he returned without any fanfare.
When the Buddha heard some of his disciples discussing Ajatasattu’s behavior after battles he told them this story so they knew it was not the first time he had been happy when he won and miserable when he lost.