At least ten.
Cited passages
A person born of a forbidden union shall not enter into Yahweh’s assembly; even to the tenth generation shall no one of his enter into Yahweh’s assembly.
Deuteronomy 23:2 bars the offspring of an illegitimate union from the assembly of YHWH for ten generations, but the genealogies of David in Matthew 1 and Luke 3 trace him back through Pharez (the son of Judah and Tamar's incestuous union) in only nine generations. The legal rule and the messianic genealogy don't line up.
People have answered this in several ways; GEBible presents them as equal peers.
Cited passages
A person born of a forbidden union shall not enter into Yahweh’s assembly; even to the tenth generation shall no one of his enter into Yahweh’s assembly.
Judas begat Phares ... Phares ... [Phares was a "bastard" to God. (See Genesis 38:)] [1] Esrom ... [2] Aram ... [3] Aminadab ... [4] Naasson ... [5] Salmon ... [6] Booz ... [7] Obed ... [8] Jesse .... [9] David. Matthew 1:3-5 (See also Luke 3:31-33)
Cited passages
This passage isn’t available in the reading corpus yet.
Judah became the father of Perez and Zerah by Tamar. Perez became the father of Hezron. Hezron became the father of Ram. Ram became the father of Amminadab. Amminadab became the father of Nahshon. Nahshon became the father of Salmon. Salmon became the father of Boaz by Rahab. Boaz became the father of Obed by Ruth. Obed became the father of Jesse.
the son of Melea, the son of Menan, the son of Mattatha, the son of Nathan, the son of David, the son of Jesse, the son of Obed, the son of Boaz, the son of Salmon, the son of Nahshon, the son of Amminadab, the son of Aram, the son of Hezron, the son of Perez, the son of Judah,
Examining the tension
What follows is one scholar’s way of reading this disagreement — a critical-historical view that often concludes the texts genuinely disagree. It draws on the peer-reviewed sources listed below and stands as one position among the answers above, presented for transparency, not as GEBible’s position.
How critical scholarship weighs this: Leans toward reconciliation
This summarizes where critical scholarship tends to land on this tension — a report on the field’s center of gravity, not GEBible’s own ruling.
Deuteronomy 23:2 (MT 23:3) is unambiguous in the Hebrew: "No *mamzer* (מַמְזֵר) shall enter the assembly of YHWH; even to the tenth generation none of his shall enter the assembly of YHWH." The KJV "bastard" captures the gist but flattens a famously obscure word. *Mamzer* appears only twice in the Hebrew Bible (here and Zechariah 9:6), and its etymology is contested; HALOT and BDB register it as the offspring of an illicit union without pinning down the precise prohibited category. The Septuagint of Deuteronomy 23:3 (LXX numbering) renders the clause ἐκ πόρνης ("born of a prostitute") — a free, interpretive rendering rather than a strict lexical equivalent — and the Vulgate has *de scorto natus*; both are already interpretive guesses about a word the translators no longer securely understood. The Tannaitic tradition (m. Yebamot 4:13) narrowed *mamzer* to the issue of unions punishable by *karet* or death — chiefly incest and adultery — but the older Deuteronomic stratum reads as a blanket multi-generational exclusion. The phrase "to the tenth generation" stands in close parallel to the very next verses (Deut 23:3-4 MT 23:4-5), where the exclusion of Ammonites and Moabites is glossed *ad olam* ("forever"); on that reading "tenth generation" functions as an idiom for perpetuity rather than a literal countdown, which sharpens the problem rather than softening it.
Genesis 38 then hands us Perez (Pharez), born to Judah by his daughter-in-law Tamar — a union the narrator frames as both deceptive and incestuous (Lev 18:15 explicitly bars a man from his daughter-in-law). Under the rabbinic incest definition of *mamzer*, Perez is a textbook case. Matthew 1:3-6 and Luke 3:31-33 both route David's line through Perez. The arithmetic must be stated carefully. Perez is the *mamzer* — generation zero, the disqualified ancestor. His descendants run Hezron, Ram (Aram), Amminadab, Nahshon (Naasson), Salmon, Boaz (Booz), Obed, Jesse, David. Counting only Perez's descendants, David is the *ninth* in line; counting names inclusive of Perez himself, David is the tenth name in the list. The contradiction depends on the first count: David, the messianic fountainhead, enters the assembly as the ninth generation issuing from the *mamzer* Perez — one short of the tenth-generation bar that would clear his line. (Listing ten names is not the same as nine generations of descendants; Perez is excluded from the count of those barred-then-cleared, since he is the *mamzer* himself, not one of his ten generations of descendants.)
The apologetic harmonization runs three ways. First, narrow the definition: Gleason Archer's *Encyclopedia of Bible Difficulties* restricts *mamzer* to the child of cultic prostitution or mixed-cult marriage, not ordinary illegitimacy. Second, dismiss the count as schematic: Matthew's genealogy is openly stylized into three sets of fourteen (Matt 1:17), telescoping generations, so it cannot be pressed arithmetically — and indeed Matthew demonstrably omits three Davidic kings (Ahaziah, Joash, Amaziah) between Joram and Uzziah in 1:8, so the list is selective by design. Third, the chronological move: the law post-dates Sinai and could not retroactively bind Perez.
Each has weaknesses. The cult-prostitute reading lacks lexical support; the Hebrew gives no such qualifier, and the LXX's "born of a prostitute" is itself a gloss, not a cultic specification. The schematic-genealogy defense is double-edged: conceding that Matthew's count is unreliable undercuts the very genealogical argument used to certify Davidic (and thus messianic) descent, and in any case the law's clock runs from Perez regardless of how many names the evangelist omits — telescoping would only make the qualifying descendant arrive sooner, not later, and Luke's fuller list (Luke 3:31-33) likewise yields nine descendants. The chronological defense ignores that Boaz, Jesse, David, and Solomon all post-date Sinai in the biblical timeline yet fall inside ten generations of Perez; the Deuteronomist presents the law as binding from Sinai forward, and a perpetuity reading ("forever," per the *ad olam* parallel) would bar the line regardless.
The more economical critical read is that the Deuteronomic exclusion and the Davidic genealogy belong to different traditions that were never harmonized. Tigay's JPS commentary notes that Deuteronomy 23 reflects a purity ideology later intensified in Ezra-Nehemiah's campaign against mixed marriage, while the genealogy preserves an older inclusive memory. Christine Hayes situates the *mamzer* rule within evolving Second Temple intermarriage halakhah, where the boundaries of "who may enter" were precisely the contested question. Raymond Brown and Davies-Allison observe that the evangelists' inclusion of Tamar (and Rahab, Ruth, and Bathsheba) is theologically pointed — flagging irregular unions as part of a deliberate motif, not policing them against Deuteronomy 23. The tension is real but "disputed": whether it counts as a contradiction depends on which reading of *mamzer* one adopts and how literally one presses a genealogy the evangelist openly stylized.
Where the critical reading lands: overstated as bare arithmetic, but genuine as an unreconciled clash of traditions — an exclusionary purity law and an inclusive messianic genealogy bound into one canon without anyone harmonizing the count.
Sources for this reading