A couple had a useless son named Halvor who would just grope about in the ashes; when they bound him out, he only lasted a day or two. Then a skipper invited him on board and he went. A storm carried them off to a far land, where Halvor went to look about. It was a beautiful land but no one could be seen. Finally, he reached a castle where a princess warned him of the troll, but fed him, had him try a sword on the wall, and gave him a potion the troll used when he lifted the sword. When the troll came, Halvor cut off all three of its head. She asked him to help her sisters, and he did so, even though they were prisoners of a troll with six heads and a troll with nine heads. He chooses the youngest of them for his bride.
After a time, he wants to see his parents, so they give him a magical ring to wish himself there and back, but warn him not to mention them. He went back and bragged of them. They appeared before them all, but then took the ring and went back without him. He set out to find the castle again. He meets up with an old woman who kept the Moon's house, and the Moon did not know, but the old woman traded him boots "with which you can take twenty miles at each stride" for his horse and sent him off to the West Wind, which led him to the castle, where the princess was marrying again. He used the ring the princess had left with him to reveal himself, and the princess married him and not her new bridegroom.
- Big Fancy Castle: The trolls live in them.
- Bright Castle: Soria Moria.
- Cool Sword: The princesses give him one to kill the troll with.
- Damsel in Distress: All three princesses
- Earn Your Happy Ending: A long quest to get back.
- Gratuitous Princess: All three damsels are princesses.
- Our Trolls Are Different: They have three, or six, or nine heads.
- The Quest: To return to his wife.
- Rescue Romance: They even offer to let him choose which rescuee he will marry.
- Ring of Power: It can let him go and return — and bring her.
- Rule of Three: The three princess, the three trolls — with heads in multiples of three.
- Standard Hero Reward: Halvor gets it.
- Textile Work Is Feminine: The princesses are spinning when he finds them.
- Youngest Child Wins: He marries the youngest