A poor miller tells the king that his daughter can spin straw into gold. The king locks her in a castle room to test her. She cries because the task is impossible. A little man appears. He spins the straw into gold. He takes a trinket in payment. The king is delighted. He does not know the girl has had supernatural help. He tests the girl again the next night. Once more, the little man does the task and receives a trinket. On the third night, the girl promises to give the little man her first-born child in payment for again spinning the straw into gold. The king marries the girl. She gives birth to a child. The little man comes to claim the child. He gives the queen the chance to keep her baby if she can guess his name. A courtier spies on the little man and learns his name is Rumpelstiltskin. The queen confronts the little man with his name. He rages and tears himself in two.