This is how the birth of Jesus the Messiah happened. His mother Mary was engaged to marry Joseph. But before they married, he learned that she was expecting a baby. (She was pregnant by the power of the Holy Spirit.) Mary’s husband, Joseph, was a good man. He did not want to cause her public disgrace, so he planned to divorce her secretly.
But after Joseph thought about this, an angel from the Lord came to him in a dream. The angel said, “Joseph, son of David, don’t be afraid to accept Mary to be your wife. The baby inside her is from the Holy Spirit. She will give birth to a son. You will name him Jesus. Give him that name because he will save his people from their sins.”
All this happened to make clear the full meaning of what the Lord said through the prophet: “The virgin will be pregnant and will give birth to a son. They will name him Immanuel.” (Immanuel means “God with us.”)
When Joseph woke up, he did what the Lord’s angel told him to do. He married Mary.