Pt3 Solomon, Ashmedai, and the Shamir: Demonology, Temple-Building, and the Reversal of Royal Power (Gittin 68a-b)
This is the third and final part of a three-part series. Part 1 is here, Part 2 is here; the outline of the series can be found at Part 1.
Solomon’s final exchange: testing superiority, the ring, deposition, and restoration dispute
Solomon keeps Ashmedai until the Temple is completed. Later, Solomon asks what makes demons “greater” than humans, citing Numbers 24:8 and a rabbinic gloss that associates “lofty horns” (תועפות) with angels and the “wild ox”1 with demons.
Ashmedai demands that Solomon remove the chain and give him the ring; only then will he demonstrate his strength. Solomon complies. Ashmedai swallows the ring, enlarges until one “wing” is in heaven and one on earth, and throws Solomon 400 parasangs.2 Solomon responds by quoting Ecclesiastes 1:3 about the profit of toil “under the sun.”3
Ashmedai takes Solomon’s place. The sugya then reads Ecclesiastes 2:10 (“and this was my portion”) as requiring a demonstrable referent: Rav and Shmuel dispute whether “this” refers to Solomon’s staff or his cloak. Solomon is then described as going door to door collecting charity, repeatedly saying: “I, Kohelet, was king over Israel in Jerusalem.”
When he reaches the Sanhedrin, they infer that a madman does not persist in one claim with such consistency and suspect truth. They test the reigning “king” through the queens and receive reports that he conceals his feet (coming in socks) and demands sex even from a niddah and from Solomon’s mother Batsheva.
They bring Solomon and re-arm him with the ring and chain engraved with the divine name; when Ashmedai sees Solomon, he flees. Even afterward, Solomon remains fearful, and Song of Songs 3:7–8 is cited about Solomon’s bed surrounded by sixty armed men “from fear in the nights.”4
The sugya closes with a dispute: one view says Solomon was “king and then a commoner”,5 never returning; the other says “king, commoner, and king” .6
Solomon asks what makes demons greater than humans - Numbers 24:8
תרחיה גביה עד דבנייה לבית המקדש.
יומא חד
הוה קאי לחודיה,
Solomon kept Ashmedai with him until he completed building the Temple.
One day
he stood with Ashmedai alone.
אמר ליה:
כתיב: ״כתועפות ראם לו״
ואמרינן:
״כתועפות״ –
אלו מלאכי השרת
״ראם״ –
אלו השדים
מאי רבותייכו מינן?
He said to Ashmedai:
It is written: “For him like the lofty horns of the wild ox” (Numbers 24:8),
and the Sages say in explanation of the verse:
“Like the lofty horns (תועפות)”;
these are the ministering angels.
“The wild ox (ראם)”;
these are the demons.
In what way are you greater than us?
Why does the verse praise your abilities and powers over those of human beings?
Ashmedai demands removal of the chain and receipt of the ring
אמר ליה:
שקול שושילתא מינאי,
והב לי עיזקתך,
ואחוי לך רבותאי.
Ashmedai said to him:
Take the chain engraved with God’s name off me
and give me your ring with God’s name engraved on it,
and I will show you my strength.
Once unbound, he swallows the ring, expands cosmically, and hurls Solomon 400 parasangs
שקליה לשושילתא מיניה,
ויהיב ליה עיזקתיה.
בלעיה,
אותביה
לחד גפיה ברקיעא,
ולחד גפיה בארעא,
פתקיה ארבע מאה פרסי.
Solomon took the chain off him
and he gave him his ring.
Ashmedai swallowed the ring
and grew until he placed
one wing in the heaven
and one wing on the earth.
He threw Solomon a distance of 400 parasangs.
Autobiographical lament - Ecclesiastes 1:3
על ההיא שעתא אמר שלמה:
״מה יתרון לאדם בכל עמלו שיעמל תחת השמש״.
With regard to that moment Solomon said:
“What profit is there for a person through all of his toil under the sun?!” (Ecclesiastes 1:3).
With Solomon deposed from the throne, Ashmedai took his place.
Dispute of Rav and Shmuel - What remained in Solomon’s hand? Staff or Cloak - Ecclesiastes 2:10
״וזה היה חלקי מכל עמלי״
מאי ״וזה״?
רב ושמואל:
חד אמר:
מקלו
וחד אמר:
גונדו
With regard to the verse: “And this was my portion from all of my toil” (Ecclesiastes 2:10),
the Talmud asks: What is the meaning of the expression: “And this”? This expression is always an allusion to an item that is actually in his hand or can be shown.
Rav and Shmuel disagree with regard to the meaning of this phrase:
One said:
This is referring to Solomon’s staff that remained in his hand.
And one said:
This is referring to his cloak (גונדו)
Solomon wanders begging, repeating “I was king” - Ecclesiastes 1:12
היה מחזר על הפתחים,
כל היכא דמטא --
אמר:
״אני קהלת
הייתי מלך על ישראל בירושלים״
Solomon circulated from door to door7 collecting charity,
and wherever he arrived --
he would say:
“I, Ecclesiastes,
was king over Israel in Jerusalem” (Ecclesiastes 1:12).
... prompting Sanhedrin suspicion, since a madman doesn’t fixate on one claim
כי מטא גבי סנהדרין,
אמרו רבנן:
מכדי
שוטה בחדא מילתא לא סריך,
מאי האי?!
When he finally arrived at the Sanhedrin in Jerusalem
the rabbis said:
Now,
an imbecile8 does not fixate on one matter all of the time,
so what is this matter?!
Is this man perhaps telling the truth that he is Solomon?
They test the reigning “king” via the queens: he hides his feet (nonhuman tell) and demands sex during menstruation and from Bathsheba
אמרו ליה לבניהו: קא בעי לך מלכא לגביה?
אמר להו: לא.
The sages said to Benayahu: Does the king require you to be with him?
Benayahu said to them: No.
שלחו להו למלכוותא: קאתי מלכא לגבייכו?
שלחו להו: אין, קאתי.
שלחו להו: בידקו בכרעיה.
They sent to the queens and asked: Does the king come to be with you?
The queens sent a response to them: Yes, he comes.
They sent a request to the queens: Check his feet9 to see if they are human feet.
שלחו להו:
במוקי קאתי;
וקא תבע להו בנידותייהו;
וקא תבע לה נמי לבת שבע אימיה.
The queens sent a response to the sages:
He always comes in socks [be-mokei], and it is not possible to see his feet.
The queens continued discussing the king’s behavior: And he demands (תבע) of them, i.e., the queens, to have sex when they are menstruating (נידותייהו).
And he also demands that Bathsheba his mother have sex with him.
Once the Sanhedrin heard this they understood that this was an imposter and not actually Solomon.
Imposture exposed; Solomon is re-armed with ring/chain; Ashmedai flees
אתיוה לשלמה,
והבו ליה עזקתא ושושילתא דחקוק עליה שם.
כי עייל --
חזייה,
פרח.
They brought Solomon,
gave him a ring and the chain on which the name of God was carved.
When Solomon entered --
Ashmedai saw him
and fled10
Solomon remains fearful - Song 3:7–8
ואפילו הכי --
הוה ליה ביעתותא מיניה.
והיינו דכתיב:
״הנה מטתו שלשלמה ששים גבורים סביב לה מגבורי ישראל,
כולם אחוזי חרב מלומדי מלחמה,
איש חרבו על יריכו מפחד בלילות״.
The Talmud adds: And even so, although Ashmedai fled --
Solomon was fearful of him,
and this is as it is written:
“Behold the bed of Solomon surrounded by 60 strong men from the warriors of Israel.
All of them holding swords and trained in war,
each man with his sword on his thigh from fear in the nights” (Song of Songs 3:7–8).
Rav/Shmuel debate whether Solomon’s arc is “king → commoner” or “king → commoner → king,” leaving the restoration either partial or complete
רב ושמואל:
חד אמר:
מלך והדיוט,
וחד אמר:
מלך והדיוט ומלך.
Rav and Shmuel disagreed with regard to this story of Solomon:
One said:
He was a king and afterward he became a commoner,
and never returned to his position as king.
And one said:
He was a king, and became a commoner, and a king,
as ultimately he returned to his throne and defeated Ashmedai.
Appendix - Major folkloric themes in this sugya, with comparative parallels
Solomonic demon-control via the Divine Name and a signet-ring
The chain and ring engraved with a sacred name function as binding/command devices. This aligns with a broad “names have power” complex and with the wider Solomonic legend-cycle, especially in late antique and medieval Jewish/Christian/Islamic materials, where Solomon’s authority over spirits is mediated through a ring, seals, inscriptions, or divine names.
The “trickster capture” pattern: intoxication, substitution, and binding
Benayahu defeats Ashmedai by engineering circumstances (water → wine) that induce vulnerability, then uses a binding object. This is a common folklore structure: the superhuman is not beaten by force but by a ruse that exploits appetite, habit, or a routine.
Ascetic/“pious demon” and boundary-crossing
Ashmedai is portrayed as disciplined (sealed water, daily verification, alternating heavenly and earthly study halls). This matches a recurring comparative motif: morally ambiguous spirits who nonetheless participate in “religious” practices, thereby blurring the human/other-than-human boundary and heightening narrative tension.11
Etiology and “explaining a name”
The hoopoe episode is an explicit etiology for the Aramaic rendering “cutter of mountains.” Comparative folklore frequently uses a short wonder-tale to justify a word, epithet, or local translation, presenting lexicography as narrative.
Sacred construction constraint and the “non-iron” temple
The Temple’s “no iron tool” condition generates the need for a magical stone-cutter (shamir). This is a classic “ritual taboo produces technical problem produces wonder-solution” sequence, comparable to tales where sacred space demands special materials or nonstandard building methods.
The magical tool guarded by a nonhuman custodian; acquisition by exploiting parental care
The shamir is held by a cosmic official (sea’s minister) and loaned under oath to a bird. The agents obtain it by manipulating the bird’s care for its chicks. This resembles widespread motifs: a rare object held under strict conditions; humans obtain it by exploiting a predictable biological or emotional drive (nest/offspring).
Oath-keeping to the point of self-destruction
The “wild chicken”’s suicide over violating an oath dramatizes oath as binding beyond ordinary survival logic. Folklore often uses extreme consequences to mark the seriousness of sworn trust in cosmic economies (especially where the lender is an angelic/cosmic authority).
Memento mori as anti-imperial speech
The “four cubits of a grave” rebuke is a conventional moralizing theme: the conquering king is reduced to burial-measure. It functions as a narrative check on royal overreach, and it is widely paralleled in antiquity and medieval literature (wise counselor/outsider reminding a ruler of mortality).
Interpretive “odd acts” list and retrospective decoding
The five puzzling behaviors, later explained as knowledge of hidden verdicts/futures, use a common riddle-structure: (a) opaque acts; (b) demand for explanation; (c) reveal of concealed knowledge (heavenly proclamations, impending death, buried treasure). The effect is to depict demonic perception as access to otherwise inaccessible information.
The changeling/impostor king and the “double on the throne”
Ashmedai replaces Solomon and rules in his stead; Solomon becomes the wandering claimant. This is a well-attested motif (the displaced ruler; the false king), often used to explore legitimacy, recognition, and the fragility of status.
Recognition tests focused on bodily markers and sexual transgression
The queens’ report about concealed feet and prohibited sexual demands are “diagnostic signs” of nonhuman imposture. Cross-culturally, impostor detection often hinges on body anomalies (feet/legs) and boundary-violating sexuality; both function as quick narrative proofs that the occupant is not the rightful human king.
See a similar trope about an incarnated Elijah doing this to a Roman’s letter, in my “Three Charges, Many Miracles: The Trial of R’ Elazar ben Perata (Avodah Zarah 17b)“, section ““Why did you free your slave?”“, where I summarize:
Another accusation was that R’ Elazar had emancipated his slave. He denied the accusation.
When a witness stood to testify against him, Elijah, incarnated as a Roman nobleman intervened, predicting that a miracle would protect R’ Elazar. Ignoring the warning, the witness prepared to testify.
Elijah then grabbed a letter intended for the Roman emperor (בי קיסר), carried by the witness, and threw it 400 parsangs.
The witness left to retrieve it and did not return, leading to the dismissal of all charges against R’ Elazar ben Perata.
According to rabbinic tradition, Ecclesiastes is attributed to Solomon (see Wikipedia, “Ecclesiastes“, section “Composition“, sub-section “Title, date and author“); accordingly, several verses from the book are cited here and interpreted as referring to Solomon in this narrative.
Compare also my “Appendix - The Order and Authorship of Biblical Books (Bava Batra 14b-15a)“, section “Compilation by Later Redactors: Jeremiah, Hezekiah, Men of the Great Assembly, Ezra, and Nehemiah”, list item #2, where I summarize:
Hezekiah (c. 700 BCE) and his colleagues (סיעתו): Isaiah, Proverbs, Song of Songs, and Ecclesiastes.
Like Ecclesiastes, according to rabbinic tradition, Song of Songs is attributed to Solomon (see Wikipedia, “Song of Songs”, section “Composition“, and ibid. section “Judaism“); accordingly, this verse is interpreted as referring to Solomon in this narrative.
הדיוט - from Greek.
Note that this word is more typically used in the Talmud to refer to a non-priest; as opposed to here, where it means a non-king.
I.e., restoration occurred. This dispute is cited in tractate Megillah as well, see “Ahasuerus and the Kingship of the World (Esther 1:1; Megillah 11a-b)“, section “Other Historical World Rulers Omitted from the List and the Reasons Why“, sub-section “Solomon (I Chronicles 29:23)“ (I cited this in an earlier part of this series as well).
מחזר על הפתחים — literally “going around the doorways.” This is a standard Talmudic idiom meaning to go from house to house begging, i.e., to subsist on public charity. It denotes extreme poverty and commonly appears in discussions of communal obligations of charity (tzedakah) and the dignity of the poor, marking the lowest level of economic self-sufficiency.
This same description is given elsewhere in the Talmud in the context of Haman’s downfall describing some of this sons, see my “Talmudic Interpretations of the Book of Esther: Esther 5:6-6:10 (Megillah 15b-16a)“, section “The Fate of Haman’s Sons (Esther 5:11): died, hanged, or became beggars; Number of Haman’s Sons - 30, 70, or 208 (I Samuel 2:5)“, and see my note there for more on this term.
For another example of the trope of riches/status to rags/humiliation (especially as a form of measure-for-measure punishment), see these pieces of mine:
Divine Reciprocity: Biblical Instances of Measure-for-Measure (‘Midah Keneged Midah’) Punishment and Reward (Mishnah Sotah 1:7-9)
“The Humiliation of Haman: The Dramatic Talmudic Elaboration of the Biblical Verse of Haman Carrying out King Ahasuerus’s Orders to Honor Mordecai (Esther 6:11-12; Megillah 16a)”, final part: Pt2
שוטה.
This is the standard Talmudic word to refer to someone mentally deficient. Here, it more narrowly means something like a “madman, insane”.
פרח - literally: “flew”.
On demons as liminal beings, both similar and dissimilar to humans, see my “Appendix - The Dual Nature of Demons and Humans (Chagigah 16a)”.

