[1] The tale is classified in the Aarne-Thompson-Uther Index as ATU 313, "The Magic Flight" ("Girl Helps the Hero Flee").
While wandering, he meets an old man who offers to help guide him home in exchange for the first thing that comes out of the king's palace upon his arrival.
Recalling that his faithful and beloved dog always greeted him first on his return, the king is displeased with the proposed deal.
In order to ensure that the old man doesn't learn about the deception, the king lets his son grow up in the peasant's house.
One day, the young man leaves his home dressed in a sack and carrying a bag of peas.
The prince replies that he is carrying the peas from his aunt's funeral and is going to deliver them to the watchers, a custom followed in the kingdom.
Happy that the young man accepted his offer, he twirls and sings as he escorts the prince to his secret home.
The girl carefully brings out food and sets it on a table in the room, seemingly unaware of the young stranger.
Enchanted by her demureness and beauty, the prince guesses she is not the man's daughter, but the peasant girl exchanged for him.
He wanders around the farmstead and sees many animals, including a black cow, a white-faced calf and, alone in a stable, a white horse.
The maiden, who knows the enormous appetite of the horse, whispers a suggestion that he weave a strong rope from the grass.
He should then warn the horse that he will bind its mouth shut and plug it up (prevent it from defecating) if the animal eats too much.
Again, the maiden secretly helps the newcomer by telling him to heat a pair of tongs and threaten to use them if the cow does not give all her milk.
He does so and the terrified horse begins to run, quickly, hauling back the entire stack of hay.
The next morning, the old man tells the young prince that he is satisfied with his work and, to show his gratitude, he will marry him to his daughter.
The prince finds that the peas he left behind him have sprouted and grown, creating a clear route back to the palace.
The old man goes to the second stall in the barn and sends the goblins after the couple, instructing them to drink the brook and catch the fish.
He pleads with her to change her mind, but she answers by rolling the ball into the peasant's cottage and then vanishing inside.
[7][8] The story contains two motifs which are frequent in folk-lore; that of a man promising a stranger something in return for assistance, and that of a hero and heroine uniting and fleeing together in a transformation chase.
[1][9] The tale was translated as Prince Harold and the Ogre and published in The Outlook Fairy Book for Little People.