Now this is how Jesus the Messiah was born. His mother, Mary, was engaged to be married to Joseph. But while she was still a virgin, she became pregnant by the Holy Spirit.
Joseph, her fiance, being a just man, decided to break the engagement quietly, so as not to disgrace her publicly.
As he considered this, he fell asleep, and an angel of the Lord appeared to him in a dream. "Joseph, son of David," the angel said, "do not be afraid to go ahead with your marriage to Mary. For the child within her has been conceived by the Holy Spirit.
And she will have a son, and you are to name him Jesus, for he will save his people from their sins."
References for Matthew 1:21
All of this happened to fulfill the Lord's message through his prophet:
"Look! The virgin will conceive a child! She will give birth to a son, and he will be called Immanuel (meaning, God is with us)."
References for Matthew 1:23
When Joseph woke up, he did what the angel of the Lord commanded. He brought Mary home to be his wife,
but she remained a virgin until her son was born. And Joseph named him Jesus.