Kukkuripa was a mahasiddha who lived in India. He became interested in tantric Buddhist practice, and chose the path of renunciation. During his travels, he found a starving dog in a bush. Moved by compassion, he fed the dog and took care of her. The two stayed together and eventually found a cave where Kukkuripa could meditate in peace. When he went out for food, the dog would stay and guard the cave.
One day, after 12 years passed, the stories say that the gods of the Thirty-three sensual heavens took note of Kukkuripa's accomplishments, and invited him to their heavens. He accepted, and while there he was given many pleasureable things, such as great feasts. Every time he would think of his loyal dog, left behind at the cave, he would begin to think that he should return to her, but every time they would convince him to stay.
Eventually, he looked down from the heavens and saw that his dog had become thin, sad, and hungry, and right there he decided that he would return to the cave. Upon his return, both master and dog were happy, and upon scratching her, the dog instantly vanished. In her place stood a dakini. The dakini told him that he had learned that there are greater things than temptation, and helped grant him realization. He attained realization, and returned to Kapilavastu, where he lived a long life for the benefit of others.