Skip to content
E-Lights Ki Teitzei

The “Skeletons” in King David’s Lineage

By Rabbi Heschel GreenbergAugust 21, 20267 min read

The Prohibition Against Ammonites and Moabites

The Torah states:

“An Ammonite or Moabite may not enter the congregation. Even their tenth generation may not enter the congregation of G-d, because of the matter that they did not greet you with bread and water on the road when you were leaving Egypt, and because they hired Bilaam, the son of Beor, from Pesor in Aram Naharaim, against you, to curse you.” (Deuteronomy 23:4–5)

There is a Midrash, belonging to the genre of puzzling Midrashim, that states:

“This is what the verse meant when it states, ‘I thank You because You afflicted me, and You were to me a salvation.’”

At first glance, there appears to be no thematic connection between the Torah’s prohibition against marrying an Ammonite or Moabite and King David’s declaration of gratitude to G-d for having afflicted him and ultimately saving him.

Why does the Midrash connect these two seemingly unrelated subjects?

The Oral Torah as David’s Salvation

The nineteenth-century sage Rabbi Mordechai Banet provides an explanation based on the words of the Midrash Tanchuma.

The Midrash addresses the well-known Talmudic tradition that G-d had to coerce the Jewish people into accepting the Torah by placing Mount Sinai over their heads and threatening to crush them beneath the mountain if they refused to accept it.

This raises an obvious question. The Torah itself records that the Jewish people enthusiastically declared:

“Na’aseh v’nishma — We will do and we will hear.”

They were prepared to accept the Torah unconditionally, even before hearing what it contained. How, then, can the Talmud assert that they had to be coerced into accepting it?

The Midrash Tanchuma answers that there was a distinction between the Written Torah and the Oral Torah. The Jewish people were eager to accept and embrace the Written Torah, but they were not prepared to accept the Oral Torah. They therefore had to be compelled to accept the Oral Torah as well.

Rabbi Mordechai Banet then connects this teaching to the controversy surrounding King David’s lineage.

The Legitimacy of King David

King David’s lineage was challenged by his detractors. His great-grandmother, Ruth, was a Moabite woman who married Boaz. How, they asked, could such a marriage have been permitted?

Their argument was that the Torah explicitly prohibits an Ammonite or Moabite from entering the congregation. They therefore claimed that David himself was illegitimate and, consequently, unfit to become king.

The answer to their accusation came from the Oral Torah.

The halachic tradition teaches that the prohibition against an Ammonite or Moabite entering the congregation applies specifically to the male Ammonite or Moabite. It does not apply to an Ammonite or Moabite woman. Thus, Ruth, as a Moabite woman, was permitted to marry Boaz.

King David’s status—and ultimately the legitimacy of the Davidic dynasty—was therefore saved by the Oral Torah.

Rabbi Mordechai Banet explains that this is the deeper meaning of David’s declaration:

“I thank You because You afflicted me, and You were to me a salvation.”

David was expressing gratitude for the fact that G-d had placed Mount Sinai over the heads of the Jewish people and compelled them to accept the Oral Torah. That Oral Torah ultimately became the source of his own salvation and established the legitimacy of his dynasty.

A Deeper Reading: The Affliction of King David

One may suggest another approach to this enigmatic Midrash.

Perhaps the Midrash was disturbed by the Torah’s prohibition against marrying a Moabite because, on the surface, it seems to cast a shadow over King David—and, by extension, over the future Mashiach who would emerge from his dynasty.

The Midrash therefore cites David’s declaration:

“I thank You, for You have afflicted me.”

What was the affliction to which David was referring?

It was the humiliation he had to endure throughout his life because of questions surrounding his legitimacy.

People accused him of being illegitimate. They questioned whether he was even permitted to marry another Jew, let alone become king and establish the dynasty that would ultimately produce Mashiach.

David was therefore subjected to a particularly painful form of humiliation: the very lineage that was destined to produce the king of Israel and the Moshiach was itself repeatedly questioned and disparaged.

The Many “Skeletons” in David’s Lineage

When we look more deeply into King David’s ancestry, the problem becomes even more striking.

On his maternal side, his great-grandmother Ruth was a Moabite. The nation of Moab itself originated from the controversial episode involving Lot and his daughters. The Torah describes how Lot’s daughters became pregnant by their father, resulting in the birth of Moab and Ammon.

On another branch of David’s ancestry, we encounter Judah and Tamar. Tamar was Judah’s daughter-in-law, and their union, viewed superficially, appeared to be illicit. Judah himself initially believed that Tamar had acted immorally, only later recognizing that she was righteous.

And there were even accusations concerning David’s own birth and the circumstances surrounding his parentage. Although these suspicions were ultimately rejected, the very existence of such allegations contributed to the atmosphere of uncertainty and humiliation surrounding David.

Thus, the Davidic genealogy contains a remarkable number of episodes that, on the surface, appear problematic.

It is as though David had “skeletons in his closet” at every stage of his ancestry.

The Kabbalistic Secret: Camouflage for the Soul of Moshiach

The Kabbalists offer a profound explanation for this strange phenomenon.

The reason for all this negative drama surrounding the status of King David—and, by extension, the status of Moshiach—was precisely to protect their souls from the forces of impurity that would attempt to identify, ensnare, and prevent them from fulfilling their mission.

The soul of Moshiach is associated with an exceptionally lofty spiritual source. Because of its tremendous holiness and its mission to bring about the ultimate redemption, the forces of impurity would naturally seek to prevent it from entering the world and accomplishing its purpose.

G-d therefore concealed the holiness of the Davidic soul behind a veil of ambiguity.

The questionable circumstances surrounding David’s lineage served as a kind of spiritual camouflage.

The forces of impurity could not easily recognize the extraordinary holiness hidden within a lineage that appeared so problematic.

The very things that seemed to disqualify David were, in a deeper sense, what enabled his soul to enter the world and accomplish its mission.

The Most Significant “Skeleton”: Ruth the Moabite

Of all these issues, the most pronounced and troubling was the prohibition against a Moabite entering the Jewish congregation.

Although the Oral Torah clarified that the prohibition applies only to a Moabite male, there remained ample opportunity for David’s critics to seize upon the verse and use it against him.

They could point to the Torah and say: Your great-grandmother was a Moabite. How, then, can you possibly claim legitimacy?

Such accusations could humiliate David and, in their view, potentially abort the Messianic process before it could unfold.

But David understood something his critics did not.

He recognized that the very obstacles surrounding his lineage were part of G-d’s plan.

The “Infractions” Were Actually Divine Strategy

David therefore saw through the apparent contradictions.

What looked like infractions were actually part of a divine strategy.

What appeared to be a blemish in the Davidic lineage was actually the mechanism through which the soul of Mashiach was being “smuggled” into the world, hidden from the forces that would seek to prevent its mission.

The unusual genealogy was not evidence that David was unworthy.

It was evidence of how deeply concealed his mission was.

The greater the holiness, the greater the need for concealment.

David and Saul: Two Different Models of Kingship

This idea also sheds light on a fascinating Midrashic contrast between King David and his predecessor, King Saul.

Saul was described as exceptionally righteous and sinless. Yet his kingship was not destined to endure.

David, by contrast, lived a far more complicated life. He experienced accusation, persecution, and humiliation. Yet his kingship became the eternal model of Jewish monarchy.

Why?

Because David’s kingship was connected to teshuvah, transformation, and redemption.

David’s greatness was not that he came from an unblemished human lineage. His greatness was that he could take apparent brokenness and reveal the Divine purpose concealed within it.

His monarchy therefore represented something deeper than political leadership.

It represented the ability to transform darkness into light.

Gratitude for the Affliction

We can now understand David’s extraordinary declaration:

“I will thank You for having afflicted me, for You were to me a salvation.”

David was not grateful despite his affliction.

He was grateful because of his affliction.

The humiliation, the accusations, the questions surrounding his lineage, and the apparent blemishes in his ancestry were not obstacles to his mission. They were part of the Divine process that enabled the mission to unfold.

David understood that the very accusations hurled against him were serving a higher purpose.

They concealed his true spiritual identity from the forces of impurity while simultaneously preparing the way for the Davidic dynasty and, ultimately, for Mashiach.

The Paradox of Redemption

This gives us a profound insight into the nature of redemption.

We tend to imagine that redemption should emerge from perfection: a flawless lineage, an impeccable history, and an unblemished past.

The Torah teaches us otherwise.

The Davidic dynasty teaches that redemption can emerge דווקא from apparent brokenness.

The most unlikely people can become the links in the chain of redemption. The greatest holiness can be concealed within circumstances that appear deeply problematic. What looks like a defect may actually be the camouflage that protects the Divine mission.

David therefore looks at everything that happened to him and declares:

“I thank You because You afflicted me.”

He is grateful not merely because the affliction eventually ended, but because he recognizes that the affliction itself was part of the salvation.

The “skeletons” in David’s closet were not the destruction of his destiny.

They were part of the Divine strategy that made his destiny possible.

And this is the ultimate paradox of the Davidic dynasty: the very things that appeared to disqualify David were ultimately the means through which G-d established him as the ancestor of Mashiach and the instrument of the world’s redemption.

From E-Lights, issue #1616, the weekly Torah newsletter of the Jewish Discovery Center.

WhatsApp
Rabbi Heschel Greenberg Teacher, scholar and author of Tefillin — Judaism’s Crown. About the Rabbi