When Solomon set out to build the Temple, he faced a strange obstacle hidden in plain sight in the Torah. Scripture says that "the house, when it was in building, was built of stone made ready before it was brought thither; so that there was neither hammer nor axe nor any tool of iron heard in the house, while it was in building" (1 Kings 6:7). Iron could not touch the stones of a house meant for peace.
So Solomon asked the Sages: "How shall I shape these stones without iron?" They remembered an ancient creature, one of the ten things created at twilight on the sixth day of creation — the Shameer, a worm no bigger than a grain of barley, whose touch could split the hardest substance on earth. It was the same creature Moses had used to cut the precious stones of the Ephod, the High Priest's breastplate.
Hunting a Worm Through the Demon Kingdom
But where was the Shameer? The Sages told Solomon: summon a male and female demon and interrogate them. He did. They knew nothing, but they knew who would — Ashmedai, king of the demons.
Ashmedai, they reported, lived in a distant mountain. There he had dug a pit, filled it with water, covered it with a stone, and sealed it with his own seal. Every morning he ascended to heaven and studied in the celestial academy of wisdom. Every afternoon he descended and studied in the earthly academy. Then he checked his seal, broke it, drank, resealed the pit, and vanished.
This story, preserved in Gittin 68a-b, pictures Temple-building as an act that reaches down into creation's undergrowth and up into the academies of angels. A tiny worm held in the beak of a moorhen would, in the end, shape the stones that held the Shechinah.
Even Solomon, the wisest king who ever lived, needed the cooperation of worms and demons to build a house for God.