Sun Wukong reported what he had learned to the king, who was half-believing and half-doubting. Sun Wukong, together with Zhu Bajie and Sha Monk, cleaned the filth from the pagoda and discovered the words 'Nine-Headed Worm's Blue Blood' left by the Dragon King of Ten Thousand Saints on the top floor. The next day, Sun Wukong and Zhu Bajie went straight to the Azure Waves Lake, where they found the Dragon King of Ten Thousand Saints holding a celebratory feast, attended by the Nine-Headed Worm and a host of demons. Sun Wukong and Zhu Bajie burst into the Dragon Palace, overturned the banquet, and started a fierce fight. The Nine-Headed Worm possessed powerful magic; born with nine heads, it spewed black smoke and was extremely troublesome. Sun Wukong fought fiercely with it, but neither could gain the upper hand. At the critical moment, Erlang Shen happened to pass by with his Mei Mountain brothers, and upon seeing the scene, he lent a hand. Erlang Shen's Howling Celestial Dog bit off one of the Nine-Headed Worm's heads; the worm, injured, fled to an unknown place. Sun Wukong and the others subdued the demons of the Dragon King of Ten Thousand Saints and recovered the Buddhist relic. The king of Jisai Kingdom was overjoyed, richly rewarded the monks, and held a farewell banquet for Sun Wukong and the others.
The four masters and disciples took leave of Jisai Kingdom and continued their journey westward. They came to a place where ancient cypresses stood dense and brambles were thickly overgrown — it was Thorn Ridge. Tang Monk was blown away by a clear breeze and, in a daze, was invited by tree spirits such as Eighteen Gongs, Lonely Upright, and Soaring Cloud to the Wooden Immortal Hut. These tree spirits were all refined gentlemen; they drank wine, composed poems, and discussed Chan Buddhism with Tang Monk. Tang Monk was deeply captivated and felt no fear at all. Suddenly, a beautiful demoness, Apricot Immortal, performed a dance and then proposed marriage to Tang Monk. Sun Wukong came, saw this scene, and was filled with rage. He swung his Ruyi Jingu Bang and killed all the tree spirits, and also eliminated the Apricot Fairy. Although Tang Monk was rescued, he scolded Sun Wukong for killing innocents indiscriminately. Sun Wukong felt displeased but could only protect Tang Monk and continue onward.