Once when the Buddha was residing at Jetavana monastery, he delivered the Jataka Story about a golden peacock who was a Bodhisatta. He related this story to one of his disciples who had been enchanted by a woman.
At one time a golden peacock (a Boddhisatta) lived on the golden hill of Dandaka in the Himalaya mountain. In the morning, while watching the sunrise the peacock chanted the divine mantra. After that he went about searching for food. In the evening at sunset, the bird did the same and went to sleep.
One day Queen Khema of Benares dreamed that she heard a peacock giving a discourse. She requested the King to bring back the peacock to the palace so that she could listen to his doctrine in real life. The King then sent the hunter to catch the bird. But by the protective power of the divine mantra, the trap would not work.
For seven years, the hunters could not succeed. He died and it was followed by the queen’s death. The king was angry at the bird. He made an inscription saying that whoever would eat the flesh of the peacock, would be young and immortal always.
So several successive rules of the kingdom attempted to capture the bird, but all were in vain. The seventh successor to the king sent a clever hunter, who had a charming peahen, which could sing very sweetly. Early one morning, the hunter set up the snare with the peahen in front of the peacock, the bird was tempted. It approached her without chanting the Mantra and was caught in the snare.
The hunter happily presented it to the king. The king was delighted at the Bird’s beauty. He placed it on a royal seat and had a conversation with it.
The peacock asked the king why he was caught. The king said that the former king left an inscription saying that whosoever eat its flesh could be young and immortal. The peacock said that in his previous life, he observed the five precepts strictly and the result his body become golden in colour.
The story of the previous life was explained by the peacock in detail as well as the power of the divine mantra. The king was very pleased. The bird was released to fly back to the golden hill of Dandaka.
This discourse is generally recited for safety and as a protection against being trapped or imprisonment. It is found in the Khuddaka Nikaya Pali text and the Jataka Story.