The Bodhisatta was once an iguana. He lived in a massive burrow with hundreds of other iguanas who followed his leadership. His young son was close friends with a chameleon and the Bodhisatta disapproved because chameleons are low-class creatures and mingling with them would bring misery to their entire iguana clan. But his son refused to end the friendship as his father ordered.
Anticipating danger from the chameleon, the Bodhisatta dug a new tunnel out of the burrow to use in case of an emergency. The iguana grew large while the chameleon stayed small and eventually their hugs began to hurt the chameleon and he realized they would soon kill him. So he decided to end their friendship and help a hunter kill all the iguanas.
When ants came out after a thunderstorm, the iguanas ran around hunting them. The chameleon saw an iguana hunter coming with his shovel and dogs and he led them to the burrow of his former friend. He told the hunter where to start a fire to smoke the iguanas out and the plan worked. As the iguanas fled the fire, the hunter smashed as many as he could with a stick and let his dogs catch the rest. As the slaughter took place outside, the Bodhisatta escaped though his secret tunnel. Knowing this must be the work of the chameleon, he remarked that “bad company can never end in good.”
In the Lifetime of the Buddha
The disobedient young iguana was an earlier birth of one of the Buddha’s disciples who had been persuaded by his friend, after being invited time and time again, to skip his alms rounds and eat fancy morning meals at the monastery of Devadatta (the chameleon of the story), a disciple of the Buddha who became his nemesis. The Buddha told this story to the traitorous disciple and those who had reported his misbehavior to let them know that not listening to wise people can have bad results for the entire group.