There once was a shepherd who served a wealthy king. It was this shepherd's duty to take the king's numerous herds of sheep and cattle to the meadow every day to graze.
One day, while the shepherd was in the fields, he heard dogs barking, and saw that they were chasing a young man. Then he acted at once, using his shepherd's staff to chase off the dogs, and thus saved the young man from their teeth. But when the young man came closer, the shepherd was astonished to see that he did not cast a shadow, and he knew at once that although he had a human form, he must be a demon. This, indeed, was the case, and the demon was very grateful and said: You have saved me from the clutches of the dogs, who otherwise would have torn me to pieces. My father Asmodeus is the king of demons, and if you will accompany me to his palace he will surely reward you. But do not be distressed if he does not speak to you for three days, for on the third day he will surely ask you to name the reward you would like for having saved me, his son. And then you will surely receive whatever it is that you request. The shepherd agreed to accompany him, after he had returned the herds to the stable. Then he set off with the prince of demons and they walked until dark. They built a fire and the demon cooked delicious dishes of a kind the shepherd had never tasted, for demons eat and drink like men, but have their own dishes, and do not share the secrets of how they are prepared.
While they were eating there was a loud chorus of birds chirping in the tree above them, and the shepherd said to the demon prince: I have heard that demons like yourself know the language of the birds, but I have never believed it to be true. Oh, yes, it is certainly true, said the demon. In fact, the birds in this tree are talking about you. If that js the case, said the shepherd, prove it by telling me what it is they are saying. Nor did the demon resist the challenge, but said: One of the birds said to the others: 'The lucky shepherd is going to receive a great reward. If he were smart, he would ask for a hat that would make him invisible. That way he could go anywhere he wanted to without being seen.' 'No,' said a second bird, 'I think he should ask for a magic tablecloth which would become covered with food whenever it is spread open. That way he would never have to go hungry.' 'You are both foolish,' said a third bird. 'Surely he should ask for a magic sack which would always remain filled with gold. That way he could buy anything his heart desired.' 'Not so,' said a fourth bird. 'If he were clever he would ask for a magic stick, able to open any door. That way no gate could remain closed to him.' 'In fact, all of you are wrong,' said a fifth bird. 'If he were truly clever, he would request the magic flute of Asmodeus, which he uses to summon the demons and spirits who serve at his command.' 'You are all fools,' said a sixth bird, 'for if he were a clever man indeed he would ask for all five of these magical gifts. After all, he did save the son of the king of demons, and he deserves a great reward.' Now when the shepherd heard what the birds had said, he decided at once to follow the advice of the last bird, and to ask for all five of those magic gifts. Then he thanked the demon for translating the words of the birds, and he admitted that the demon was capable of understanding the language of birds after all.
The two continued on their way until they came upon a female demon, who was asleep at the side of the road. The shepherd asked the demon who it was, and he told him that she was a relative of Asmodeus. Then the shepherd saw that the demon had a precious ring on her finger, and he was so charmed by the ring that he wanted to steal it from her. But the demon prince said to him: Do not steal the ring. While it is true that whoever wears that ring will be protected from any danger by turning it, it is also true that whoever steals it will die within three days. Nevertheless, the shepherd decided to take the risk, so precious was the ring, and he took it from the sleeping demon's finger, and placed it on his own. Then the two continued on their way until they came to the palace of Asmodeus, king of demons.
There the demon prince told his father how the shepherd had saved his life. But although Asmodeus nodded his approval, he said nothing at all; nor did he speak to the shepherd for three days. But on the third day Asmodeus said at last: What reward do you ask for the great favor you have done by saving the life of my son? Then the shepherd replied: I ask to be rewarded with five gifts: a hat which will make whoever wears it invisible; a magic tablecloth which will be covered with food whenever it is spread open; a magic sack which will always be filled with gold; a magic stick empowered to open any door; and, last of all, your magic flute, with which you summon the demons and spirits who serve your will. Now Asmodeus was surprised that the shepherd was so well informed as to what he should ask for, but at the same time he noticed the ring that he wore on his finger, and he recognized it. Thus he did not question the reason for these choices, or attempt to barter with him, but provided him with all that he had asked for and sent him on his way. For he knew that the time remaining to him was short.
Now Asmodeus also saw to it that the shepherd was returned to his home that day, with all of his wondrous gifts. But before he could tell his wife and son all that had happened, the demon's prophecy regarding the stolen ring came true, and the shepherd fell to the floor, dead. So it was that his wretched widow and son remained impoverished, for they did not know the true value of the gifts, and merely placed them in a comer of their poor cottage. And to sustain the family, the son of the shepherd took the place of his father, and became the king's shepherd.
For all that his father had left him was the ring he had worn, which the boy now wore as his own.
One day when the young shepherd went out to the pasture he asked his mother to give him a small tablecloth on which to place his bread. Now they were so poor that they did not own a tablecloth, but then his mother remembered the tablecloth that had remained folded in the corner until then, which the shepherd had brought with him the day he had died, and this is what she gave her son. And when the lad reached the fields and opened the tablecloth, he found it suddenly covered with platters of silver and gold that were filled with delicacies more wonderful than anything he had ever tasted. The youth was amazed at this, but still he ate everything with a hearty appetite. And when he returned home, he told his mother about the wonderful tablecloth, and from that time on they had the finest foods to eat at every meal.
Not long afterward, the boy asked his mother to give him a hat before he left for the fields, for the sun was scorching hot that day. His mother gave him the hat which his father had brought as a gift from Asmodeus, and as soon as he put it on, he disappeared, and his mother could not see him. But when he took off the hat, she saw him again. It is a magic hat! the youth rejoiced. And then he asked his mother for his father's flute as well, so that he might play to the sheep in the meadow.
Now when the young shepherd went out into the meadow and began to play the flute, there appeared before him spirits and demons, who bowed down before him and asked him what it was that he wished. Then the lad asked them to tell him where his father had obtained those magical objects, and they told him the tale of how his father had saved the son of Asmodeus, and how he had been rewarded. And but for his error in stealing the demon's ring, he would have been alive to enjoy their benefits.
But now they belonged to the boy, including the ring, and they would surely serve him well. And when the young shepherd learned this, he vowed that he would make good use of the treasures that his father had obtained at such a cost. Then he picked up the flute of Asmodeus and turned it over, and at that moment all the demons disappeared. So it was that in this way he discovered that to summon the demons he need but play on it, and to send them away he need but turn it over.
Now because of all these treasures, the fortunes of this lad and his mother were greatly improved, and for the first time they were able to gather savings. Then the boy asked his mother to give him a sack in which he could put away all that they had saved, and she gave him the sack from the corner, which his father had obtained from Asmodeus. But as soon as he opened the sack, he found it already filled with golden coins, making the boy and his mother almost as wealthy as the king. And when the lad poured out the coins to count them, he discovered, to his amazement, that the bag was inexhaustible.
After that the boy gave up being a shepherd, and purchased a large shop in the city and began to sell food and clothing at very low prices. Soon the people stopped buying from the other merchants, and bought only from him. The merchants were incensed about this, and they complained to the king that the boy was selling his goods so cheaply that no one bought their own.
The king heeded their words, and decided that the boy must be stopped. He turned to his daughter, the princess, for help, since she knew the charms and spells of demons, and she said: You can leave the matter to me. I will see to it that he is stopped. That night the princess had the youth invited to her chamber.
No sooner did he arrive, however, than she commanded her servants to throw him out the third-floor window. This they did, but the boy turned the magic ring as he fell, and the spirits and demons caught him before he reached the ground, and made certain that he was safe and sound.
Now that the lad had seen the great beauty of the princess, he decided that he must have her for his own. And the next day he returned to the palace, but its heavy iron gates were locked.
Then he knocked on the gates with the magic stick, and the gates immediately opened before him and he went inside. Now when the princess saw him coming, she could hardly believe her eyes, and she quickly ordered her servants to throw him out of the fourth-floor window. But once again the boy turned the ring, and the demons saw to it that he landed without coming to any harm.
The following day the determined boy went back to the palace, this time wearing the hat that made him invisible. No one saw him, of course, and in this way he came into the chamber of the princess without anyone knowing he was there. Then, all at once, he removed the hat and revealed 'himself, and the astonished and frightened princess screamed for her servants, who came running, and this time she ordered that he be thrown out of the window of the fifth floor. But when this had been done and she looked out of the window, she saw that the boy was alive and well, laughing on the ground.
The next day the youth came to the palace and played the magic flute of Asmodeus. All at once a multitude of demons appeared and crowned him with a royal crown, placed him on a throne, sounded trumpets, and carried him into the palace.
When the king heard the tumult he fled to the palace roof and announced that he would give the boy anything he asked for.
Then, without hesitating, the lad said: Let me have your daughter, the princess, for my wife. Now the king had not expected this, and he wanted to refuse, but the princess whispered to him:
Agree to let him marry me and send him to my chamber. This time I will succeed in taking care of him for good. So it was that the lad came to the chamber of the princess, and this time he was welcomed with open arms, and no one attempted to throw him from a window. Instead she offered him wine to drink, and when he was quite drunk, and did not know his right hand from his left, she said to him: Tell me, what is the source of your great power? And being drunk, the boy foolishly revealed this secret, and told her of the magic flute of Asmodeus, and of all the other magic treasures—the hat that made him invisible, the stick that opened the door, the magic tablecloth that supplied him with food, and the magic sack filled with golden coins. Then the princess asked him where he kept these treasures, and the drunken boy confessed that they were hidden beneath his bed. Then the princess ordered one of her servants to bring them to her, and when she had all of the treasures in her possession, she turned over the flute, as the boy had explained, so that the army of demons disappeared. After this she tied the lad with ropes, and called in a giant servant and ordered him to throw the drunken boy into the sea.
But the lad had meanwhile emerged from his stupor, and saw that his life was in danger. Then he was greatly relieved to find he still had the magic ring on his finger, for in his drunken state he had forgotten to tell the princess about it. He turned it, and at once demons appeared and spirited him away from the giant servant, and carried him off to the woods in which they lived, setting him down near two large apple trees. On the one tree grew large red apples, of the most delicious kind, and on the other tree grew green apples that looked very bitter. From where he was hidden behind the trees, the boy saw a passerby pick one of the ripe apples and bite into it. Immediately the man sprouted two long horns, which reached the sky. Then he picked one of the green apples and took a bite of it, and the horns immediately disappeared.
After that the boy picked a basket full of red apples and took a few green ones as well, and traveled to the market, disguised as an apple merchant. There he was easily able to sell the red apples to a servant of the king, and in this way the apples were soon served to the king and his ministers, and when they ate them, they all sprouted long horns. Then they were terribly upset, and summoned all the doctors and wise men in the land, but none knew a way to rid them of the horns. Meanwhile the princess had herself tasted one of the red apples, and she too had grown long horns and was sorely distressed. Then the boy again donned a disguise—this time that of a doctor, and came to the palace and promised to heal everyone on the condition that the princess be made his wife. This promise he received in writing from the king himself, signed with the royal seal, and then he gave each of them one of the green apples, and as soon as they took a bite out of them the horns disappeared, and they were completely cured. After this the boy revealed his true identity, and married the princess, who saw that it was futile to struggle against such a clever lad, and in this way he won her over, and her feelings for him turned to love, and they lived together happily ever after.