We know that Mary’s relative Elizabeth was from the tribe of Levi:
Luke 1:5 Zechariah, of the division of Abijah. And he had a wife from the daughters of Aaron, and her name was Elizabeth.
Luke 1:36 And behold, your relative Elizabeth in her old age has also conceived a son, and this is the sixth month with her who was called barren.
But this doesn’t mean that Mary was from Levi. The most obvious meaning of “relative” here, given the age difference between Mary and Elizabeth, that Elizabeth was Mary’s aunt – in which case she would be a maternal aunt, suggesting that Mary’s father – from Judah – married a girl from Levi. Which explains the words of Gabriel:
Luke 1:30 And the angel said to her, “Do not be afraid, Mary, for you have found favor with God. 31 And behold, you will conceive in your womb and bear a son, and you shall call his name Jesus. 32 He will be great and will be called the Son of the Most High. And the Lord God will give to him the throne of his father David, 33 and he will reign over the house of Jacob forever, and of his kingdom there will be no end.” 34 And Mary said to the angel, “How will this be, since I am a virgin?
Note that Mary does not say “How will this be, since I am not descended from David?”
This then brings us to the two family trees – which is immediately puzzling because Matthew says Joseph’s father was called Jacob, while Luke appears to say his father was called Heli – and after that the family trees are totally different for 14 generations back to different sons of David.
So we have two family trees, but Joseph cannot have two fathers:
Matthew 1 (the legal line from David’s successor, Solomon)
Matthew, a Jewish writer writing primarily for Jews, starts from Abraham (not Adam) and naturally follows the legal line of the kings of Israel:
Matt 1:6 …And David was the father of Solomon by the wife of Uriah, 7 and Solomon the father of Rehoboam….16 and Jacob the father of Joseph the husband of Mary, of whom Jesus was born, who is called Christ.
The word “of whom” Jesus was born is feminine in Greek, indicating (naturally enough) that Jesus was born of Mary, not Joseph. The Greek also says “Jacob begat Joseph” – making it 100% clear that Joseph’s father’s name was Jacob.
Luke 3 (the physical line from another of David’s sons, Nathan)
Luke, a Gentile writer writing for Theophilus and other Greeks, starts with Adam (not just Abraham) and follows the physical line of Jesus’ descent via Mary:
Luke 3:23 Jesus, when he began his ministry, was about thirty years of age, being the son (as was supposed) of Joseph, [the son] of Heli, …. the son of Nathan, the son of David, ….. the son of Seth, [the son] of Adam, [the son] of God.
Now it’s difficult that Joseph son of Jacob could also be son of Heli and have two fathers. The early church historian Eusebius went through hoops to construct an explanation that would explain this by constructing a hypothesis that (a) Heli’s mother married twice – to Joseph’s grandfather and to Heli’s father, (b) Heli died childless (c) Joseph’s father Jacob as Heli’s half brother then married Heli’s wife, (d) Joseph was born biologically son of Jacob, but legally son of Heli….
Fortunately there’s another explanation that is a lot less complicated and doesn’t depend on a string of coincidences.
The first thing to note in the text is the “the son (as was supposed) of Joseph”, and the second thing to note is that the original text does not have the words “[son] of… [son] of”, Luke only says
Luke 3:23 Jesus, when he began his ministry, was about thirty years of age, being the son as was supposed of Joseph-son-of-Jacob, [but in fact] of Heli, …. [ ] of Nathan, [ ] of David, ….. [ ] of Seth, [ ] of Adam, [ ] of God.
Joseph was son-in-law of Heli, not son. When Luke says “of Heli” he means: “Jesus, son of Mary, daughter of Heli”
The curse on the house of Jacob
There is another reason why the family tree in Luke must be Mary’s family tree, not Jacob’s. In Jeremiah 22:24-30 God pronounced a curse on Jacob’s ancestor Jeconiah, declaring his descendants ineligible to sit upon the throne of David.
Jeremiah 22:30 Thus says the Lord: “Write this man down as childless, a man who shall not succeed in his days, for none of his offspring shall succeed in sitting on the throne of David and ruling again in Judah.”
And this happened – even when the Jews returned from Babylon, Jacob’s ancestor Zerubbabel, who was the rightful king, was not allowed by the Persian rulers to reclaim his throne. Instead Nehemiah served as a civil governor, and later the throne passed to non-Davidic kings, such as Herod.
So why did Matthew record a genealogy that was not Jesus’?
One final question is why Matthew would record a family tree that after David, from Solomon onwards, in fact had nothing physically to do with Jesus? The list includes some great kings – such as Hezekiah and Josiah, but God never promised Hezekiah or Josiah a descendent. The reason is this:
2 Samuel 7:12 When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. ….. 16 And your house and your kingdom shall be made sure forever before me. Your throne shall be established forever.’”
Luke 1:69 and has raised up a horn of salvation for us in the house of his servant David,
For the purposes of the legal side of this promise about David’s house, it was not enough to be born of a minor descendant of David, which Mary was, and then let Christ be adopted into the house of any adoptive father – of the tribe of Benjamin, Levi, Asher, etc. – Mary’s husband had to also be descended from David, and not just physically descended, like Mary, but from the major royal line.
In this way the marriage of Mary to Joseph fulfilled every detail of the promise to David, at the same time as not breaking the curse against Joseph’s ancestor Jeconiah.