EsoteriaA library of sacred & hidden knowledge
Liber XXVIII · Solomonic Magic

Liber XXVIII · Solomonic Magic · Chapter V: Legends of Solomon

Solomon and Asmodeus: The Shamir, the Temple and the Exile

The legend of Solomon and Asmodeus from the Talmud: the shamir, building the Temple, the stolen ring, the king's exile and return, and Asmodeus in Tobit.

The picture is a Greek Catholic icon depicting King Solomon with the plans of the Temple of Jerusalem that was built by him according to the Bible. The icon was painted in the end of the 18th century as part of…
The picture is a Greek Catholic icon depicting King Solomon with the plans of the Temple of Jerusalem that was built by him according to the Bible. The icon was painted in the end of the 18th century as part of…Jojojoe · CC BY-SA 3.0 · Wikimedia Commons

The legend of Solomon and Asmodeus is a rabbinic tale, preserved chiefly in the Babylonian Talmud (Gittin 68a–b), in which King Solomon captures Ashmedai, king of the demons, to obtain the shamir, a marvel able to cut stone for the Temple. After the Temple is built, Ashmedai tricks Solomon out of his ring, casts him into exile and rules in his place until the king is recognized and restored.

Who Is Asmodeus?§

Asmodeus, in Hebrew Ashmedai, is one of the few demons in Jewish literature with a developed personality. His earliest appearance is in the Book of Tobit, a Jewish work usually dated to the third or second century BCE and included in the Catholic and Orthodox Old Testament (it is part of the Apocrypha in Protestant usage). In Tobit the "evil demon Asmodeus" has killed each of the seven men married to Sarah, daughter of Raguel, on their wedding night. Guided by the archangel Raphael, the young Tobias burns the heart and liver of a fish, the smoke drives the demon away to Egypt, and Raphael binds him there.

The origin of the name is debated. Many scholars have connected it with the Avestan aeshma-daeva, the Zoroastrian demon of wrath, which would fit Tobit's eastern setting in Nineveh and Media. Others have proposed a Semitic derivation from a root meaning "to destroy." The Persian etymology remains the most widely cited, though it is not certain.

By the rabbinic period Ashmedai had become the king of demons, a figure both dangerous and oddly wise, who laughs at human folly and knows the future. The same demon appears in the Testament of Solomon, where he declares that he plots against newlyweds and is thwarted by Raphael and the smoke of a fish, a direct borrowing from Tobit.

The Problem of the Shamir§

The Talmudic legend grows out of a puzzle in Scripture. First Kings 6:7 states that the Temple was built of stone prepared at the quarry, so that no hammer, axe or any iron tool was heard in the house while it was being built. Exodus 20 also forbids hewn stone for the altar, and later rabbinic tradition explained that iron, used to make weapons that shorten life, was unfit for a building meant to lengthen it.

Temple of Solomon from Views in the Ottoman Dominions, in Europe, in Asia, and some of the Mediterranean islands (1810) illustrated by Luigi Mayer (1755-1803).
Temple of Solomon from Views in the Ottoman Dominions, in Europe, in Asia, and some of the Mediterranean islands (1810) illustrated by Luigi Mayer (1755-1803).Rawpixel · CC BY-SA 4.0 · Wikimedia Commons

How, then, were the stones cut? The rabbis answered with the shamir. In the Mishnah (Avot 5:6) the shamir is listed among ten things created on the eve of the first Sabbath at twilight, alongside the mouth of the earth that swallowed Korah, the mouth of Balaam's donkey and the rainbow. Rabbinic sources describe it variously as a tiny creature or a stone-like substance the size of a barleycorn that could split the hardest material. Moses was said to have used it to engrave the names of the tribes on the stones of the high priest's breastplate, and Solomon needed it for the Temple.

The Talmudic Narrative: Gittin 68a–b§

The Gemara in Gittin introduces the story in a discussion of demons, and it unfolds in several stages.

Capturing the King of Demons§

Solomon asks the rabbis how to build without iron, and they tell him about the shamir. He conjures a male and a female demon, who reveal that only Ashmedai knows where it is. Ashmedai lives on a mountain, where he has dug a pit filled with water, covered it with a stone and sealed it with his seal. Each day he ascends to the heavenly academy to study, then returns to inspect the seal, drink and depart.

Solomon sends Benaiah son of Jehoiada, his chief warrior, with a chain and a ring engraved with the divine name, along with fleeces of wool and skins of wine. Benaiah drains the pit through a hole bored from below, stops it with wool, and fills it with wine from above. Ashmedai, finding wine where water should be, at first refuses it, citing verses against drunkenness, but thirst overcomes him. He drinks, falls asleep, and Benaiah binds him with the chain bearing the name.

Ashmedai's Strange Journey§

On the way to Jerusalem Ashmedai behaves enigmatically. He brushes against a palm tree and knocks it down, and against a house and topples it, but spares the hut of a poor widow. He laughs at a man ordering shoes to last seven years, because the man has only seven days to live, and at a magician sitting over buried treasure, unaware of it. He weeps at a wedding because the groom will soon die. Each scene illustrates that the demon can see what humans cannot, and that human plans are fragile.

Brought before Solomon, Ashmedai reveals that the shamir belongs not to him but to the Prince of the Sea, who has entrusted it to the woodcock or moor-hen (tarnegol bara), a bird that uses it to split mountains so that seeds may grow. Solomon's men cover the bird's nest with glass; the bird fetches the shamir to cut it; and the men frighten it into dropping the treasure. The Temple can now be built.

The Ring and the Exile§

Solomon keeps Ashmedai with him until the Temple is complete. One day the king asks what makes demons greater than men. Ashmedai replies that if Solomon removes the chain and gives him the ring, he will show him. Solomon agrees. Once released, Ashmedai seizes the king, spreads one wing on the earth and the other toward the sky, and hurls him four hundred parasangs away.

Solomon wanders as a beggar, repeating the words of Ecclesiastes, "I, Koheleth, was king over Israel in Jerusalem." Meanwhile Ashmedai sits on the throne in Solomon's likeness. Eventually the Sanhedrin grows suspicious. They learn that the king no longer summons Benaiah and that he visits his wives wearing socks, which suggests he is hiding the feet of a rooster, a sign associated with demons. Given the ring and the chain with the divine name, Solomon returns; Ashmedai sees him and flies away. The Talmud records a dispute over whether Solomon was ever fully restored to his former status, and adds that he afterward feared the demons, which is how the sages explained the sixty mighty men guarding his bed in Song of Songs 3:7–8. More on the ring itself is in our article on the Seal of Solomon.

Later Midrash and Medieval Retellings§

The legend was retold and expanded in later works. Versions appear in later midrashic collections, and medieval compilations add new episodes: in some, Ashmedai casts the ring into the sea, a fish swallows it, and Solomon finds it in his dinner, a motif shared with the Islamic version. The midrash on Ecclesiastes and the Yalkut collections draw on the story to explain Solomon's melancholy reflections on vanity as the words of a king who lost everything.

Jewish folklore also developed Ashmedai's character more fully. In some medieval tales he is a comparatively benign figure who keeps his promises and respects Torah scholars; in others he marries a human woman or rules over the demons as a kind of shadow monarch. Louis Ginzberg's Legends of the Jews gathers many of these strands and documents their sources.

Parallels in Islamic and Christian Tradition§

The closest parallel is the Islamic legend explaining Qur'an 38:34, where God says He tested Solomon and placed a body on his throne. Commentators told how the jinni Sakhr obtained Sulayman's ring, ruled in his form for forty days, and threw the ring into the sea, where a fish swallowed it until Sulayman recovered it. The similarities are striking: the stolen ring, the false king, the wandering, the recovery from a fish. See Sulayman in Islamic tradition for the Qur'anic context.

Islamic depiction of Sulayman talking with his architect, discussing the construction of his temple. He is served by divs/jinn and angels in his endeavour. From a Persian 1580 Stories of the Prophets manuscript.
Islamic depiction of Sulayman talking with his architect, discussing the construction of his temple. He is served by divs/jinn and angels in his endeavour. From a Persian 1580 Stories of the Prophets manuscript.Unknown authorUnknown author · Public domain · Wikimedia Commons

In Christian demonology Asmodeus became the demon of lust, following Tobit's association with marriage. Medieval writers assigned him to that deadly sin, and in early modern demon catalogues he appears as a powerful king. The Goetia lists him as Asmoday, the thirty-second spirit, described with three heads; the details are covered in our article on the Ars Goetia and its 72 spirits. Readers can follow the broader development of Christian demonology in our history of Satan and the Devil.

Interpreting the Legend§

Modern scholars read the Gittin narrative on several levels. It is a piece of exegesis, resolving a textual problem about iron tools. It is folklore, drawing on widespread motifs: the trickster demon, the drunken captive, the impostor king, the ring recovered from a fish. And it is moral commentary. Solomon's power over demons depends on the divine name, and the moment he surrenders it out of curiosity or pride he becomes powerless. The rabbis linked this to his later failings recorded in Scripture and to the tone of Ecclesiastes.

The legend also reveals how the rabbis thought about demons. Ashmedai studies Torah in the heavenly academy, quotes Scripture and knows the future. He is dangerous, but he is not simply evil; he belongs to an ordered cosmos ruled by God. This is a different picture from later Christian demonology, where demons are fallen angels in rebellion, and it helps explain why the story could be told with humor as well as awe.

Frequently asked questions§

What is the shamir in the Solomon legend?§

The shamir is a miraculous creature or substance, created on the eve of the first Sabbath according to the Mishnah, which could cut stone without iron tools. In the Talmud Solomon captures Asmodeus to learn where it is so that the Temple can be built without the sound of iron.

Where is the story of Solomon and Asmodeus found?§

The principal source is the Babylonian Talmud, tractate Gittin 68a–b. Later midrashic and medieval Jewish works expand it, and there are close parallels in Islamic commentary on Qur'an 38:34.

Is Asmodeus in the Bible?§

He appears in the Book of Tobit, which is part of the Catholic and Orthodox Bible and of the Apocrypha in Protestant usage. He does not appear in the Hebrew Bible itself.

Did Solomon really lose his kingdom to a demon?§

The Bible contains no such episode. The exile story is rabbinic legend, partly built on the opening of Ecclesiastes, where the speaker says he "was king" over Israel, which the rabbis read as implying a time when he no longer was.

Sources and further reading§