God made King David a promise that his throne would be established forever. David's descendant would be the Messiah. I read somewhere that the Jewish people had a more detailed genealogy than any other group of people in all of world history. When we get to the New Testament it begins with the genealogy of Christ. A second genealogy is found in the book of Luke. These genealogies are recorded to prove the royal lineage of Christ - that He is heir to the throne! If you trace the royal descendants of King David in the Old Testament, you find that one of his descendants was cursed by God. The curse was that none of his descendants would rule again in Judah. On one hand God promises King David that his descendant would inherit the throne and then later says his royal descendants would not rule on the throne. This would have puzzled scholars for centuries. They were eagerly waiting for their Messiah. They thought He would be a mighty military leader and restore their nation to power. They weren't expecting a suffering servant would inherit the throne. God kept His promise to David and His curse on David's descendant by the Messiah being born of a virgin. Again confirming to us that nothing is impossible for God and that He is faithful to His promises.
The Messiah would be a direct descendant of King David from the tribe of Judah.
Jehoiachin was one of the last kings of the nation of Judah. He did evil in the sight of the LORD. 2 Kings 24:6-16
Jehoiachin was a bad king and God curses him because of it. See Jeremiah 22:24-30 and note that "Coniah" is a variant of Jehoiachin's name. King Nebuchadnezzar of Babylon captured Jehoiachin and took him to Babylon. He takes all of the treasures of the house of the LORD.
The curse of Jehoiachin is found in Jeremiah 22:30. It says not one of Jehoiachin's descendants will rule again in Judah.
God had made a covenant with King David. We call it The Davidic Covenant.
"Your house and your kingdom shall endure before Me forever; your throne shall be established forever."
2 Samuel 7:16
God's lovingkindness will not depart from David. Though David's descendants would be disciplined, God will not abandon them. (2 Samuel 7:14-15)
The Davidic Covenant is summarized in 1 Chronicles 17:11-14
"... his throne shall be established forever."
God promised King David and all of His people that the Messiah would come through David's descendants and the tribe of Judah. God promised to establish a house, a kingdom and a throne that will last forever - all from the direct legal lineage of King David.
The Messiah was to come from not only David's lineage (which could have made the gene pool very large), but had to be a legal successor in order to inherit the throne of King David. In other words, the Messiah had to be a legal heir to the kings of Judah. Problem was that cursed Jehoiachin was in that legal lineage. So how could God give a legal King that is not under the curse?
With the Virgin Birth.
There are two genealogies of Christ in the Bible.
Genealogy #1 is located in Matthew 1:1-16. In this genealogy Jesus is shown as the legal heir to the throne having descended from King David through his son, Solomon, and on down to Joseph, the earthly father of Jesus. All inheritance, legitimacy and rights were passed on through male heirs. (Inheritance is a key word in the Bible and you should pay attention when you see it. The Messiah had to receive the inheritance so that through Him we could receive our inheritance.)
Jesus was the legal heir to the throne through his father, Joseph. But Joseph descended through Jeconiah (note Jeconiah is a variant of Jehoiachin and is what he was called in the Chronicles) and would therefore be under a curse. God cursed Jehoiachin though. So what's up?
Genealogy #2 is located in Luke 3:23-38. It is widely believed this genealogy traced Jesus' line through His biological mother, Mary. In this genealogy Jesus is shown as the blood descendant of King David through his son, Nathan, and on down to Mary, the mother of Jesus. Nathan is a whole different branch of the family tree!
[King David took many concubines and wives and had many sons through them. See 2 Samuel 3:2-6 and 2 Samuel 5:14-16 and note the name Nathan in verse 14.]
God solved the problem of the curse with the Virgin Birth!
Joseph descended from King David and he was the legal father of Jesus. Jesus was Joseph's adopted son and therefore Jesus inherited the rights to the throne of David. Jesus is the legal heir of David.
Mary was not descended from Jehoiachin and was therefore, not under the curse. She was the mother of Jesus who descended from King David and through her, Jesus is the real Son of David.
When we think of Jesus being born we think about the miracle of the Virgin Birth. Jesus is the Son of God. That is a profound miracle.
But another miracle of the Virgin Birth is that through it, Jesus is proven to be the legal heir of the throne of David. He was the rightful heir from David to Solomon to Jehoiachin to Joseph, but He didn't have a drop of cursed Jehoicahin's blood in Him. Jesus' royal blood poured out on the cross for us did come from King David through His mother. He was the real Son of David fulfilling the promise God had made centuries earlier.
Only God could have come up with that solution!
I imagine the Jewish scholars back then debated with each other about how would God bring the Messiah, the King, from David's descendants when God had said no one from Jehoiachin's descendants would rule. They never in a million years would have guessed God could do it through the birth of the Messiah by a virgin. Although you might think Isaiah 7:14 would have given them a clue: "Therefore the Lord Himself will give you a sign: Behold, a virgin will be with child and bear a son, and she will call His name Immanuel."
Our King is born.
The One whose house and kingdom and throne endures forever and ever.
... "Stop weeping; behold, the Lion that is from the tribe of Judah, the Root of David, has overcome so as to open the book and its seven seals."
Let us rejoice!
[You may also want to read Any way you slice it, Jesus is King.]