Sun Wukong reported to the king what he had discovered, and the king was half-convinced, half-doubtful. Sun Wukong, together with Zhu Bajie and Sha Seng, cleaned the filth from the pagoda and discovered on the top the words 'Nine-Headed Worm's Green Blood' left by the Dragon King of Ten Thousand Saints. The next day, Sun Wukong and Zhu Bajie went straight to the Azure Wave Pond, where they saw the Dragon King of Ten Thousand Saints feasting in celebration, with the Nine-Headed Worm and other demons in attendance. Sun Wukong and Zhu Bajie burst into the Dragon Palace, overturned the banquet, and started a fierce fight. The Nine-Headed Worm possessed formidable magical powers, with nine heads that spewed black smoke, making him extremely troublesome. Sun Wukong engaged in a fierce battle with him, but neither could gain the upper hand. At a critical moment, Erlang Shen happened to pass by with his Mei Mountain brothers. Seeing the situation, they lent their aid. Erlang Shen's Hound bit off one of the Nine-Headed Worm's heads. Wounded, the Nine-Headed Worm fled, disappearing without a trace. Sun Wukong and the others subdued all the demons of the Dragon King of Ten Thousand Saints and recovered the Buddha's relic. The king of Jisai Kingdom was overjoyed, richly rewarded the monks, and held a farewell banquet for Sun Wukong and the others.
The master and his three disciples took leave of Jisai Kingdom and continued their journey westward. They arrived at a place where ancient cypresses stood thick and brambles were dense — indeed, it was the Thorn Ridge. Tang Seng was carried away by a clear wind. In a daze, he was invited by tree spirits like the Eighteenth Elder, the Solitary Upright Elder, and the Soaring-in-the-Void Elder to the Wood Immortal Hut. The tree spirits were all refined scholars, drinking wine and composing poems with Tang Seng, discussing Zen and the Way. Tang Seng became so immersed in it that he felt no fear. Suddenly, a beautiful female demon, the Apricot Immortal, offered a dance and then wished to marry Tang Seng. Sun Wukong, having tracked him down, saw this scene. Burning with rage, he swung his Compliant Golden Cudgel and beat all the tree spirits to death, then eliminated the Apricot Immortal as well. Although Tang Seng was rescued, he scolded Sun Wukong for killing the innocent indiscriminately. Sun Wukong was displeased, but could only protect Tang Seng and continue onward.