They traveled for a day when suddenly they saw a huge mountain, soaring into the clouds, named Wuxing Mountain. Tang Sanzang walked to the foot of the mountain and vaguely heard someone calling from under the mountain: «Master! Master! Save me out!» Tang Sanzang was startled, and following the sound, he saw a monkey crushed under the mountain. The monkey called himself Sun Wukong; five hundred years earlier, he had caused great havoc in Heaven and was pinned under this mountain by the Tathāgata Buddha. Now, guided by the Bodhisattva Guanyin, he was waiting here for the pilgrim to the West.
Sun Wukong begged Tang Sanzang to save him, and Tang Sanzang asked how he could be saved. Sun Wukong said: «On top of this mountain there is a golden-character seal. If you just tear it off, I will come out.» Tang Sanzang followed his words and climbed the mountain, where he indeed saw a talisman with the six-character mantra. He devoutly tore it off. As soon as the talisman was torn, a great roar was heard, the mountain split and crumbled, and Sun Wukong leaped out from the crevice of the rocks, fell to his knees and kowtowed: «Master! Your disciple Sun Wukong is willing to follow you on the journey to the Western Heaven to obtain the scriptures!»
The master and disciple bid farewell to the mountain god and the earth spirit and continued on their way. They had not gone a few li when suddenly six bandits blocked the road. Seeing this, Sun Wukong raised his Ruyi Jingu Bang and in an instant killed all the bandits. Tang Sanzang, seeing him take lives, felt distressed and scolded: «Wukong! How can you, as a monk, harm living beings like this?» Sun Wukong tried to defend himself, but Tang Sanzang would not relent and recited the Heart Sutra as punishment. Sun Wukong, annoyed, felt like leaving in a huff.
Just then, the Bodhisattva Guanyin appeared and gave Tang Sanzang a flower-patterned cap, inside which was hidden the Tight Headband. When Sun Wukong returned, Tang Sanzang tricked him into putting it on and then recited the spell. Sun Wukong's head immediately burst with excruciating pain. Sun Wukong begged for mercy repeatedly, and only then did Tang Sanzang stop. From then on, Sun Wukong learned the power of the Tight Headband spell and dared not defy his master again. He devoted himself wholeheartedly to protecting Tang Sanzang on the journey to the Western Heaven to obtain the scriptures.