Matthew 1:18-24 English Standard Version (ESV)
The Birth of Jesus Christ
18 Now the birth of Jesus Christ[a] took place in this way. When his mother Mary had been betrothed[b] to Joseph, before they came together she was found to be with child from the Holy Spirit. 19 And her husband Joseph, being a just man and unwilling to put her to shame, resolved to divorce her quietly. 20 But as he considered these things, behold, an angel of the Lord appeared to him in a dream, saying, “Joseph, son of David, do not fear to take Mary as your wife, for that which is conceived in her is from the Holy Spirit. 21 She will bear a son, and you shall call his name Jesus, for he will save his people from their sins.” 22 All this took place to fulfill what the Lord had spoken by the prophet:
23 “Behold, the virgin shall conceive and bear a son,
(which means, God with us). 24 When Joseph woke from sleep, he did as the angel of the Lord commanded him: he took his wife,
Matthew 1:18-24 New International Version (NIV)
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. 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 her quietly.
20 But after he had considered this, an angel of the Lord appeared to him in a dream 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] because he will save his people from their sins.”
22 All this took place to fulfill 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] (which means “God with us”).
24 When Joseph woke up, he did what the angel of the Lord had commanded him and took Mary home as his wife.