"Well," said the king's son, "I'll do my best to keep my head where it is at present."

"Stay here in my castle," said the king, "and you'll have good entertainment till we know can you do what will be asked of you." At night when the king's son was going to bed, the princess gave him a thimble, and said: "Have this for me in the morning."

He put the thimble on his finger; and she thought it could be easily taken away, if he would sleep. So she came to him in the night, with a drink, and said: "I give you this in hopes I'll gain more drink by you." He swallowed the liquor, and the princess went away with the empty cup. Then the king's son put the thimble in his mouth between his cheek and his teeth for safe keeping, and was soon asleep.

When the princess came to her own chamber, she struck her maid with a slat an draoichta (a rod of enchantment) and turned her into a rat; then she made such music of fifes and trumpets to sound throughout the castle, that every soul in it fell asleep. That minute, she sent the rat to where the king's son was sleeping, and the rat put her tail into the nostrils of the young man, tickled his nose so that he sneezed and blew the thimble out of his mouth. The rat caught it and ran away to the princess, who struck her with the rod of enchantment and turned her into a maid again.

Then the princess and the maid set out for the eastern world, taking the thimble with them. Shaking-head, who was watching with his cloak on, unseen by all, had seen everything, and now followed at their heels. In the eastern world, at the sea-side was a rock. The princess tapped it with her finger, and the rock opened; there was a great house inside, and in the house a giant. The princess greeted him and gave him the thimble, saying: "You're to keep this so no man can get it."

"Oh," said the giant, taking the thimble and throwing it aside, "you need have no fear; no man can find me in this place."

Shaking-head caught the thimble from the ground and put it in his pocket. When she had finished conversation with the giant, the princess kissed him, and hurried away. Shaking-head followed her step for step, till they came at break of day to the castle of King Behind the Gold. Shaking-head went to the king's son and asked: "Was anything given you to keep last night?"

"Yes, before I came to this chamber the princess gave me her thimble, and told me to have it for her in the morning."

"Have you it now?" asked Shaking-head.

"It is not in my mouth where I put it last night, it is not in the bed; I'm afraid my head is lost," said the king's son.