Kohelet Rabbah, a collection of rabbinic interpretations on the Book of Ecclesiastes, grapples with this very question, using the famous story of King Solomon and the two mothers to illustrate its point.

The text opens with a stark contrast, quoting Ecclesiastes 10:16-17: “Woe is you, land, whose king is a lad, and your princes dine in the morning. Happy are you, land, that your king is a free man, and your princes dine at the proper time, in valor and not in drunkenness.” This sets the stage for a deeper dive into what constitutes good and bad leadership, using Solomon's iconic judgment as a case study.

Remember the story? Two women, both claiming to be the mother of the same baby, come before King Solomon. One baby has died, and each woman insists the living child is hers. It’s a gut-wrenching situation, and Solomon, in his wisdom (or perhaps initially, apparent lack thereof), famously calls for a sword to divide the baby in two.

But who were these women? The text offers several interpretations. Rabbi Meir suggests they were spirits! The Rabbis offer a more grounded explanation: they were women awaiting yibbum, levirate marriage. This is where, according to Jewish law, if a man dies without children, his brother is obligated to marry his widow. According to Midrash HaMevo’ar, the outcome of Solomon’s case would determine which woman was subject to this law. Then Rabbi Simon, in a more blunt assessment, says they were actual prostitutes, and Solomon rendered his verdict without the usual legal formalities.

The text dissects the courtroom drama. We get a play-by-play, almost like a director's cut of the biblical narrative. "The one woman said: Please, my lord…it was on the third day after I gave birth…the son of this woman died" (I Kings 3:17–19). Rabbi Pinḥas and Rabbi Yirmeya, citing Rabbi Ḥiyya bar Abba and Rabbi Beivai (or Rabbi Pedat, depending on who you ask!), outline the proper judicial procedure: judge sits, parties stand, mediator decides (though some dispute the mention of a mediator), plaintiff complains, defendant responds, and then the judge decides.

Rabbi Simon adds a crucial detail: a good judge reiterates the claims of both parties. He draws this from the verse: "[The king said:] This one says: This is my son that lives [and your son is the dead], and that one says: [No, your son is the dead and my son is the living]" (I Kings 3:23). It’s about ensuring everyone is heard and understood.

But what about the sword? Rabbi Yehuda, quoting Rabbi Ilai, offers a fascinating, if slightly alarming, insight: Had he been there, he would have wrapped soft wool around Solomon's neck! Why? Because a judge who issues a false judgment is executed by strangulation. The idea is that when Solomon called for the sword, he was testing the women. Had the true mother not been overcome by mercy, Solomon’s judgment would have led to an unjust outcome.

It's at this moment, the text argues, that the "Woe is you, land, whose king is a lad" applies. It's a moment of potential disaster averted only by the true mother's compassion. But then, Solomon’s wisdom truly emerges. He realizes the significance of human anatomy, noting that God created us with pairs of eyes, ears, hands, and feet in anticipation of this very judgment! As the text notes, the Holy One blessed be He created man proportionally so it would be possible to cut the child lengthwise into two equal parts. And instead, he declares, “Give her the living child, and do not kill him" (I Kings 3:27).

And here, we transition to "Happy are you, land, that your king is a free man." This is the moment Solomon proves his worth. The Kohelet Rabbah interprets "dines at the proper time" as referring to the World to Come, and "not in drunkenness" as "in his strength and not in his weakness."

The text culminates with a powerful image: "The Divine Spirit was shouting and saying: She is certainly his mother." Rabbi Shmuel bar Naḥmani identifies three instances where the attribute of justice itself cried out: in the court of Shem, the court of Samuel, and here, in the court of Solomon. In each case, a divine voice affirms the truth.

Finally, the text offers another interpretation: "Woe is you, land, whose king is a lad" refers to the kings of Israel, while "Happy are you, land, that your king is a free man" refers to the kings of Judah. The kings of Israel, being wicked, consumed all their goodness in this world, while the righteous kings of Judah saved their reward for the World to Come.

So, what do we take away from all this? The story of Solomon isn’t just a clever trick. It's a lesson in leadership, compassion, and the importance of divine guidance. It’s a reminder that true wisdom isn't just about intellect, but about understanding the human heart and acting with justice and mercy. And maybe, just maybe, it suggests that sometimes, the best leaders are the ones who know when to listen to a higher power.