Shlomo Hamelech and Ashmedai

This story is from the Gemara in Gittin, daf 68a

When Shlomo Hamelech wanted to build the Bais Hamikdash, he ran into a problem. The Halacha is that the stones used to build the Bais Hamikdash may not be cut using a metal blade, but it was impossible to build the Bais Hamikdash without cutting through the massive stones. He turned to the chachamim for assistance.

“Moshe Rabbeinu had the same problem,” the chachamim informed him. “And he used the shamir, a specific creeping worm, to cut the stone. The shamir is an incredible creature that, by crawling on a stone, it causes it to crack.”

“Where can I find the shamir?” Shlomo Hamelech asked them.

“We don’t know where to find it, but we do have a clue that can lead you there,” the chachamim responded. “Sheidim know exactly where to find the shamir, but you will need to pull it out of them. The way to do that is to capture both a male and female sheid and to tie them up together. Don’t let them free until they tell you the secret.”

The concept of sheidim is complex and intriguing, and perhaps we will cover it in more detail a different time. In short, a sheid is a being that has three human characteristics and three characteristics of an angel.

Shlomo Hamelech was the smartest living person, and he knew how to find and capture sheidim. Following the chachamim’s advice, he captured a male and female sheid and bound them together. They begged him to set them free, but he refused until they revealed to him where he could find a shamir to use to cut the stones for the Bais Hamikdash.

“We don’t know where it is!” they insisted loudly. “We have no idea where to find the shamir!”

But he persisted in keeping them tied together and soon they gave him a lead. “We know that Ashmedai, the king of sheidim, has knowledge of where the shamir is.”

“How can I get hold of Ashmedai?” Shlomo asked them.

“We can’t tell you how to capture him,” the sheidim responded. “But we can tell you his schedule so that you can try to meet up with him. Every day, Ashmedai goes up to the Mesivta d’Rakia, to the heavenly bais medrah, where Hashem learns with the souls of tzaddikim. When the shiur is over, he goes down to the Mesivta d’Aretz and learns Torah down on earth.

“And then, after learning so much both up there and down here, Ashmedai gets very, very thirsty. He has a huge pit, which he keeps locked, that he drinks from. When he returns from learning, he first checks to see if anyone picked his lock and entered his private drinking spot. Then he opens it, drinks his fill, and locks it up again.”

“Where is the drinking pit?” Shlomo asked them, and the sheidim gave him precise directions.

Shlomo Hamelech tasked his general, Benayahau ben Yehoyada with capturing Ashmedai. He armed him with wool, many barrels of wine, a big necklace with the shem Hashem written in seventy-two osiyos, and sent him off to Ashmedai’s drinking pit. 

Benayahu ben Yehoyada was somewhat afraid of meeting the king of the sheidim, but he set out to do Shlomo’s bidding. He traveled to the pit and hid up in a tree, waiting. In the middle of the night, a strong wind blew through the area, and then he saw the awesome sight of Ashmedai coming to drink. The sheid king checked the lock on his pit, opened it, and drank. Moments later, he was gone.

After Ashmedai left, Benayahu ben Yehoyada entered the pit and dived down to the bottom. He dug a hole in the floor of the pit and drained out all the water. When the pit was completely empty, he clogged the drain with wool and earth until it was completely snug. Then he refilled the pit with not water, but wine. Carefully, he locked the pit using the same method as Ashmedai and clambered back up the tree to hide.

Nighttime fell, and Benyahau ben Yehoyada waited. Finally, Ashmedai appeared. He checked the lock on his pit, and seemed satisfied that no one had tampered with it. Thirstily, he opened the lock and was about to take a drink when he noticed that the pit was filled with wine!

“לץ היין הומה,” he murmured in disappointment, quoting a pasuk in Mishlei. He knew that if he drank the wine, he would lose control over his qualities, making himself vulnerable to danger. But he was unbearably thirsty, and somehow the water in the pit had changed to wine. Desperate to alleviate his thirst, he ignored his hesitations and drank the wine. When he was finally satisfied, the pit was empty, and the wine he consumed lulled him into a deep sleep.

Benyahu ben Yehoyada, watching carefully from between the branches above, swiftly scampered down the tree. He took the chain with the seventy-two letters of Hashem’s name and tied it around Ashmedai’s head. The king of the sheidim was still asleep, but even when he awoke, he would not be a danger to Benayahu since the chain around his neck severely hindered his power. Shlomo Hamelech’s general was no longer afraid, and stood by Ashmedai’s side until he woke up.

At last, Ashemedai awoke. He noticed the burdensome necklace immediately and tried to tear it off of himself. “Shma d’marach alach,” Benayahu ben Yehoyada told him. “The Ribbno Shel Olam’s name is on your head!”

Hearing his words, Ashmedai understood that he was powerless against his capturer. As long as the chain with Hashem’s name was around his neck, he would not be able to break free of his imprisonment. Benayahu ben Yehoyada grasped the chain and the two began walking back toward Shlomo Hamelech’s palace.

As they walked, they passed a house, and Ashmedai promptly knocked it down in anger. They walked past a tree, which Ashmedai also knocked over. There was another, smaller house up the road, owned by a widow who grew frightened when she noticed Ashmedai, a giant, nearing. “Please don’t break my house!” she squeaked in fear. 

The king of the sheidim was already very close to the house, and he twisted himself sideways to avoid knocking it over. Just his shoulder grazed the side of the house, which remained standing. But Ashmedai suffered a broken bone and a twisted back.

They continued walking and before long, they encountered a blind person who, since he could not see where he was going, had veered off the side of the road. Ashmedai picked up the man in his giant hands and deposited him back onto the road. Further still, they met another man stumbling off the road, this time a drunk. Again, Ashmedai reached for him and placed him back on the correct path.

Benayahu, accompanying Ashmedai, didn’t understand much of what he witnessed on their journey to Shlomo Hamelech, but he didn’t dare ask what was going on. Instead, he observed the strange occurrences silently.

Soon, they passed a wedding ceremony, where throngs of people were dancing around a chassan and kallah. It was a beautiful, joyous scene, but to Benayahu’s confusion, Ashmedai started to cry when he encountered it.

As they walked through town, they walked by the stall of a cobbler. A customer was in the midst of putting in an order for a new pair of shoes. “Make me a pair that will last seven years,” he instructed the shoemaker. Ashmedai, overhearing his request, burst out laughing.

Next they saw a man sitting on top of a big box, using sorcery to predict the future. This, too, caused Ashmedai to laugh mockingly.

Finally, after a long and interesting journey, the general and the sheid reached the palace of Shlomo Hamelech. Ashmedai was placed in a room to wait for his meeting with the king. As much as he would have liked to break free of the palace, he was fettered by the chain around his neck.

He waited and waited an entire day, and Shlomo did not appear to see him. “Why didn’t the king come see me right away?” he complained when someone came into the room.

“The king couldn’t come today because he drank too much,” came the explanation.

Ashmedai didn’t respond in words. Instead, he took one brick and placed it on top of another one.

When it was reported back to Shlomo Hamelech that Ashmedai had placed one brick on top of another one, the king, who was the wisest living person, understood what that meant. “That means that you should give me more to drink,” he interpreted.

The following day, Ashmedai waited again in vain for Shlomo Hamelech to appear. At the end of the day, he asked again, “Why didn’t the king come in to see me?”

“The king drank too much,” the servants responded.

In response, Ashmedai went to the pile of two bricks and took one off.

“That means I am not allowed to drink anymore,” Shlomo Hamelech explained when he was told about the incident.

On the third day, the king finally felt ready to see Ashmedai. The sheid was summoned to appear before Shlomo, and he did, wielding a stick that was four amos long (about eight feet). When he saw the king, he threw the stick onto the floor.

“Shlomo, Shlomo,” he chided. “You are merely a mortal. There will come a time when you, too, will die, and you will not take up more than four amos in the ground. You captured the entire world; everything you desire is at your fingertips. And you weren’t happy until you captured me, too?”

“I didn’t capture you on a whim,” Shlomo Hamelech told him. “I need you for one thing only. I want you to tell me where the shamir is.”

“Why do you need the shamir?” Ashmedai inquired.

“I need it to build the Bais Hamikdash,” Shlomo explained. “It’s the only way that I am able to cut the stones. You know where the shamir is, Ashmedai. I want you to tell me where it is.”

“But I don’t know where it is,” Ashmedai countered. “I don’t know where the shamir is! But I will tell you that the Angel of the Seas knows where the shamir is. And he revealed the secret to a certain rooster.”

“Why did the rooster need the shamir?” Shlomo wanted to know.

“This rooster lives on a mountaintop, where little vegetation grows,” Ashmedai explained. “It uses the shamir to crack open the mountain slightly, just enough so that it can plant seeds which he later can eat from. But you should know that the rooster will never tell you where the shamir is. It swore, when it learned the secret, that it would not reveal the secret to anyone.”

When Ashmedai was out of hearing range, Shlomo Hamelech turned to his trusted general, Benayahu ben Yehoyada. “Find out where the rooster lives,” he instructed him. “We know that the rooster is in contact with the shamir, so if we find the rooster, then we’ll be able to fool it into leading us to the shamir.”

Benayahu agreed to set out on the search, but first he stopped off for a little chat with Ashmedai, to try to clear up some of the mysteries he’d seen on the journey to Shlomo’s palace.

“Why did you put the blind person back onto the correct road?” Benayahu ben Yehoyada asked Ashmedai.

“Because a bas kol came out saying that the blind man is a tzaddik, and that anyone who does a chesed for him will get olam habah,” the sheid replied.

“So then why did you put the drunk back on the correct road?” Benayahu wondered. “He’s a drunk, why did he deserve that favor?”

“Because a bas kol came out and announced that he is a rasha,” Ashmedai explained. “I wanted him to use up all his reward in This World so that he doesn’t get anything in the Next. That’s why I helped him back onto the correct road.”

“And why were you crying when you saw the wedding?”

“Because unfortunately, the chassan will die within thirty days of the wedding,” Ashmedai said. “And his only brother was just born now. So the kallah will have to wait thirteen years until the brother is a halachic adult and can perform chalitzah for her. What a tragedy!”

“Why did you laugh when the man ordered shoes that would last him seven years?”

“That man won’t even live for seven more days, and he wants shoes that will last for seven years?!” the sheid mused.

“And why did you laugh at the sorcerer who was predicting the future?”

“Three feet under the spot where the man was sitting,” Ashmedai confided. “Was a treasure worth a veritable fortune. He’s telling everyone what will be in the future, and yet he can’t even divine that he is sitting on such a treasure! What a fool!”

Benayahu left Ashemdai in the palace of Shlomo Hamelech and set out in search of the rooster. When he discovered the rooster, he spent some time observing its habits, hoping that would give him a clue to lead him to the shamir. He watched as the rooster brought food to its nest to feed its little chicks, and an idea formed in his mind.

When the rooster left, Benayahu ben Yehoyada covered the nest with a sheet of glass, placing a barrier between the rooster and its young. The rooster would need a way to break the glass in order to get to the chicks, and it would hopefully use the shamir to crack the glass.

Sure enough, when the rooster returned to the nest and discovered the glass, it flew away, returning shortly thereafter with the shamir in its beak. Benayahu made a loud noise, startling the rooster, which then lost grip on the shamir. The shamir went flying downward, right into the pile of cotton that the wily general had prepared. He gathered up the cotton and the precious worm, while the rooster killed itself in distress.

Mission accomplished, Benayahu returned to Shlomo Hamelech bearing the shamir, which was used to cut the stones for the Bais Hamikdash.

Ashmedai, the king of the sheidim, however, was still trapped in Shlomo Hamelech’s palace, where the king would consult his wisdom.

One day, Shlomo and Ashmedai were discussing Torah when Shlomo asked the sheid about something he’d been trying to understand. “The pasuk says כי תועפות הרים לו, that Hashem has high and mighty things that help him. What is this referring to? What are the high and mighty things that Hashem has?”

“He has the malachim,” Ashmedai responded. “And, of course, he has the sheidim.”

“What big things can sheidim do that people can’t?” Shlomo challenged him.

“If you want to know what sheidim can do,” Ashmedai said carefully. “Give me that ring you are wearing, the one with the Shem Hameforash. And take off this chain around my neck. And then I’ll show you what sheidim can do.”

Shlomo Hamelech was in somewhat of a quandary, since taking the chain off of Ashmedai would mean setting him free to do what he pleased. However, he really wanted to understand the pasuk, so with mesiras nefesh, he gave his ring to Ashmedai and removed the chain.

Without the ring with the Shem Hameforash, Shlomo was unprotected and Ashmedai, without the chain around his neck, was unencumbered. Within seconds, he swallowed Shlomo Hamelech whole and threw him 1200 miles away. In that instant, Shlomo lost his entire kingdom, which he never reclaimed.

Since a sheid has the ability to change itself into any form, Ashmedai was able to disguise himself as Shlomo Hamelech. Only his sheid feet remained as a clue to his true identity, so he took care to always wear socks. In the guise of Shlomo, he usurped the throne and all of Shlomo Hamelech’s possessions, and the true king of the Jews lost everything.

The question is asked: What did Shlomo Hamelech do wrong that he deserved to lose his kingdom to Ashmedai? He captured Ashmedai for a noble purpose, so that he would be able to build the Bais Hamikdash. And he only set Ashmedai free so that he could better understand a pasuk he was learning!

The answer is that Shlomo Hamelech took the Shem Hameforash off of his finger. True, he did it for Torah, but he had merited to have Hashem on his finger and he took it off! And for that, he lost everything.