But after he had pondered these things, an angel of the Lord appeared to him in a dream and said, “Joseph, son of David, do not be afraid to embrace Mary as your wife, for the One conceived in her is from the Holy Spirit.
After Joseph ponders the matter, an angel tells him not to fear taking Mary as his wife because the child is from the Holy Spirit.
This verse brings Joseph the angelic explanation.
18This is how the birth of Jesus Christ came about: His mother Mary was pledged in marriage to Joseph, but before they came together, she was found to be with child through the Holy Spirit. 19Because Joseph her husband was a righteous man and was unwilling to disgrace her publicly, he resolved to divorce her quietly. 20But after he had pondered these things, an angel of the Lord appeared to him in a dream and said, “Joseph, son of David, do not be afraid to embrace Mary as your wife, for the One conceived in her is from the Holy Spirit. 21She will give birth to a Son, and you are to give Him the name Jesus, because He will save His people from their sins.” 22All this took place to fulfill what the Lord had said through the prophet: 23“Behold, the virgin will be with child 24When Joseph woke up, he did as the angel of the Lord had commanded him and embraced Mary as his wife. 25But he had no union with her until she gave birth to a Son. And he gave Him the name Jesus.