This is how the birth of Jesus the Messiah came about: 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.
Because Joseph her husband was a righteous man and did not want to expose her to public disgrace, he had in mind to divorce her quietly.
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.
She will give birth to a son, and you are to give him the name Jesus, because he will save his people from their sins."
All this took place to fulfill what the Lord had said through the prophet:
"The virgin will conceive and give birth to a son, and they will call him Immanuel" (which means "God with us").
When Joseph woke up, he did what the angel of the Lord had commanded him and took Mary home as his wife.
But he had no union with her until she gave birth to a son. And he gave him the name Jesus.
After Jesus was born in Bethlehem in Judea, during the time of King Herod, Magi from the east came to Jerusalem
and asked, "Where is the one who has been born king of the Jews? We saw his star when it rose and have come to worship him."
When King Herod heard this he was disturbed, and all Jerusalem with him.
When he had called together all the people's chief priests and teachers of the law, he asked them where the Messiah was to be born.
"In Bethlehem in Judea," they replied, "for this is what the prophet has written:
" 'But you, Bethlehem, in the land of Judah, are by no means least among the rulers of Judah; for out of you will come a ruler who will shepherd my people Israel.' "
Then Herod called the Magi secretly and found out from them the exact time the star had appeared.
He sent them to Bethlehem and said, "Go and make a careful search for the child. As soon as you find him, report to me, so that I too may go and worship him."
After they had heard the king, they went on their way, and the star they had seen when it rose went ahead of them until it stopped over the place where the child was.
When they saw the star, they were overjoyed.
On coming to the house, they saw the child with his mother Mary, and they bowed down and worshiped him. Then they opened their treasures and presented him with gifts of gold, frankincense and myrrh.
And having been warned in a dream not to go back to Herod, they returned to their country by another route.