David Mocked the Spider and Then Hid Inside Its Web to Survive Saul
David questioned why God bothered making spiders. Then a spider's web kept Saul from finding him. Ahithophel had wisdom for everyone except himself.
There is a pair of stories in the traditions about David that belong together, though they are rarely read side by side. One is small and almost comic: a man mocks a spider, then owes his life to one. The other is large and terrible: a man who was the wisest advisor in Israel, a man compared to an oracle of God, ends his own life in disgrace after his counsel is rejected. The thread running between them is the same: the danger of deciding that any part of creation, any person, any moment, is without purpose.
The story of David and the spider appears in the Ginzberg legends and in related midrashic sources of the Talmudic period. At some earlier point, David had expressed doubt about the wisdom of spiders. What do they actually produce? Their webs serve no purpose. They spin and spin and the result is nothing useful. It is one of those complaints humans have always made about creation: why does this particular thing exist?
Then Saul pursued him to a cave. David was inside. Saul and his soldiers were outside, and about to enter. God sent a spider. The spider wove its web across the opening of the cave. Saul looked at the web and told his men to stop: no one has gone in there, the spider's web would be torn if anyone had passed through. They turned and left. The web that David had dismissed as purposeless was the exact instrument God chose for the exact moment David needed saving.
The legend does not moralize at length. It simply records what happened and lets the irony stand. Providence, these stories consistently suggest, does not operate through your categories of useful and useless. It operates through everything, including what you have already written off as pointless. The spider's thread is, biologically speaking, among the strongest materials by weight that exists in nature. David just could not see its application until he was inside a cave waiting to die.
Ahithophel's story is the darker side of the same truth. He was David's closest advisor, a man whose counsel was regarded, according to Second Samuel 16:23, as being like consulting the word of God. He knew things about the future, about human nature, about the movements of political power, that others could not see. He left behind three rules at his death, passed down through generations: do not act against a favorite of fortune; never rise up against the royal house of David; and if the Feast of Pentecost falls on a sunny day, sow wheat. Practical wisdom. Earned wisdom. The wisdom of someone who had observed human affairs long enough to distill them into principles.
But Ahithophel made a fatal miscalculation. He joined Absalom's rebellion against David. He gave advice that, if followed, would have ended David's reign quickly and cleanly. Absalom's other advisors persuaded the prince to delay, to build a larger army first. Ahithophel saw that the delay meant failure. He went home, set his affairs in order, and hanged himself. He knew what would happen and chose not to wait for it.
The traditions about Ahithophel suggest that his wisdom was real and his downfall was also real, and that the two are not contradictory. Wisdom about external patterns, about timing and tactics and when to sow wheat, does not automatically produce wisdom about where you yourself belong in the order of things. Ahithophel read the world correctly and misread his own position in it. He had served David faithfully for years and then chose to stand against him. David's own words in Psalm 41, even my intimate friend in whom I trusted, who ate my bread, has lifted his heel against me, are traditionally understood to refer to Ahithophel.
The midrashic tradition notes that what remained of Ahithophel's wisdom came down through two unusual channels: through Socrates, who was counted among his students at some distance, and through a fortune-book he composed. What survived was fragments, shadows of the full understanding he had possessed. The rest went with him into the grave he dug for himself.
David, who had mocked the spider and then sheltered in its web, understood by the end of his life that the smallest things could be the most necessary. The cave and the spider and the night of hiding from Saul had taught him something no amount of wisdom study could teach: that your prior judgments about what is useless are always provisional, always subject to revision when you are the one lying in the dark waiting for the web to hold. Ahithophel, who had counseled kings and foresaw futures, never extended that lesson to his own soul. He applied his remarkable intelligence everywhere except to the question of where his loyalty was ultimately owed and what it would cost him to betray it.
The midrashic tradition of the fourth and fifth centuries CE that preserves both stories understood David's greatness as something assembled from precisely these kinds of lessons: the spider, the cave, the friend who became an enemy, the king who had to run from his own son. None of it was wasted. Every humiliation and every rescue went into the psalms. David wrote from inside his own failures in a way Ahithophel, who was never willing to be inside a failure, never could.