New International Version
17 Thus there were fourteen generations in all from Abraham to David, fourteen from David to the exile to Babylon, and fourteen from the exile to the Messiah.
Joseph Accepts Jesus as His Son
18 This is how the birth of Jesus the Messiah came about[a]: His mother Mary was pledged to be married to Joseph, but before they came together, she was found to be pregnant through the Holy Spirit.(C) 19 Because Joseph her husband was faithful to the law, and yet[b] did not want to expose her to public disgrace, he had in mind to divorce(D) her quietly.
20 But after he had considered this, an angel(E) of the Lord appeared to him in a dream(F) and said, “Joseph son of David, do not be afraid to take Mary home as your wife, because what is conceived in her is from the Holy Spirit. 21 She will give birth to a son, and you are to give him the name Jesus,[c](G) because he will save his people from their sins.”(H)
22 All this took place to fulfill(I) what the Lord had said through the prophet: 23 “The virgin will conceive and give birth to a son, and they will call him Immanuel”[d](J) (which means “God with us”).
24 When Joseph woke up, he did what the angel(K) of the Lord had commanded him and took Mary home as his wife.