After the birth of a great lord's daughter, Talia, wise men and astrologers cast the child's horoscope and predicted that Talia would be endangered by a splinter of flax. To protect his daughter, the father commands that no flax would ever be brought into his house. Years later, Talia sees an old woman spinning flax on a spindle. She asks the woman if she can stretch the flax herself, but as soon as she begins to spin, a splinter of flax goes under her fingernail, and she drops to the ground, apparently dead. Unable to stand the thought of burying his child, Talia's father puts his daughter in one of his country estates. Some time later, a king who is out hunting in the nearby woods, follows his falcon into the house. He finds Talia; overcome by her beauty, he tries unsuccessfully to wake her, and then rapes her. He lifted her in his arms, and carried her to a bed, where he gathered the first fruits of love." Afterwards, he leaves the girl on her bed and returns to his own city. Still deep in sleep, nine months after the incident, Talia becomes pregnant and gives birth to twins,. One day, the girl cannot find her mother's breast; instead she begins to suck on Talia's finger and draws the flax splinter out. Talia awakens immediately and names her beloved children Sun and Moon, and lives with them in the house. The king returns and to find Talia awake and that he is the father to her twins. The two fall in love, however the king is already married, and one night he calls out the names of Talia, Sun, and Moon in his sleep. His wife, the queen, hears him and she forces the king's secretary to tell her everything, and then, using a forged message, has Talia's children brought to court. She orders the cook to kill the children and serve them to the king. But the cook hides them, rather cooking two lambs instead. The queen taunts the king while he eats the meal, unaware of the cook's exchange. Then, the queen brings Talia to court. She commands that a huge fire be lit in the courtyard, and that Talia be thrown into the flames. Talia asks to take off her fine garments first. The queen agrees. Talia undresses and utters screams of grief with each piece of clothing. The king hears Talia's screams and goes to her, where his wife tells him that Talia will be burned and that he has unknowingly eaten his own children. The king commands that his wife, his secretary, and the cook be thrown into the fire instead. But, the cook explains how he had saved Sun and Moon, and fed the King two lambs instead. Talia and the king marry, and the cook is rewarded with the title of royal chamberlain. The last line of the fairy tale – its moral – is as follows: "He who has luck may go to bed, And bliss will rain upon his head."