A record of the ancestors of Jesus Christ, son of David, son of Abraham:
Abraham was the father of Isaac. Isaac was the father of Jacob. Jacob was the father of Judah and his brothers.
Judah was the father of Perez and Zerah, whose mother was Tamar. Perez was the father of Hezron. Hezron was the father of Aram.
Aram was the father of Amminadab. Amminadab was the father of Nahshon. Nahshon was the father of Salmon.
Salmon was the father of Boaz, whose mother was Rahab. Boaz was the father of Obed, whose mother was Ruth. Obed was the father of Jesse.
Jesse was the father of David the king. David was the father of Solomon, whose mother had been the wife of Uriah.
Solomon was the father of Rehoboam. Rehoboam was the father of Abijah. Abijah was the father of Asaph.
Asaph was the father of Jehoshaphat. Jehoshaphat was the father of Joram. Joram was the father of Uzziah.
Uzziah was the father of Jotham. Jotham was the father of Ahaz. Ahaz was the father of Hezekiah.
Hezekiah was the father of Manasseh. Manasseh was the father of Amos. Amos was the father of Josiah.
Josiah was the father of Jechoniah and his brothers. This was at the time of the exile to Babylon.
After the exile to Babylon: Jechoniah was the father of Shealtiel. Shealtiel was the father of Zerubbabel.
Zerubbabel was the father of Abiud. Abiud was the father of Eliakim. Eliakim was the father of Azor.
Azor was the father of Zadok. Zadok was the father of Achim. Achim was the father of Eliud.
Eliud was the father of Eleazar. Eleazar was the father of Matthan. Matthan was the father of Jacob.
Jacob was the father of Joseph, the husband of Mary—of whom Jesus was born, who is called the Christ.
So there were fourteen generations from Abraham to David, fourteen generations from David to the exile to Babylon, and fourteen generations from the exile to Babylon to the Christ.
This is how the birth of Jesus Christ took place. When Mary his mother was engaged to Joseph, before they were married, she became pregnant by the Holy Spirit.
Joseph her husband was a righteous man. Because he didn't want to humiliate her, he decided to call off their engagement quietly.
As he was thinking about this, an angel from the Lord appeared to him in a dream and said, "Joseph son of David, don't be afraid to take Mary as your wife, because the child she carries was conceived by the Holy Spirit.
She will give birth to a son, and you will call him Jesus, because he will save his people from their sins."
Now all of this took place so that what the Lord had spoken through the prophet would be fulfilled:
23Look! A virgin will become pregnant and give birth to a son, And they will call him, Emmanuel. (Emmanuel means "God with us.")
When Joseph woke up, he did just as an angel from God commanded and took Mary as his wife.
But he didn't have sexual relations with her until she gave birth to a son. Joseph called him Jesus.
After Jesus was born in Bethlehem in the territory of Judea during the rule of King Herod, magi came from the east to Jerusalem.
They asked, "Where is the newborn king of the Jews? We've seen his star in the east, and we've come to honor him."
When King Herod heard this, he was troubled, and everyone in Jerusalem was troubled with him.
He gathered all the chief priests and the legal experts and asked them where the Christ was to be born.
They said, "In Bethlehem of Judea, for this is what the prophet wrote:
6You, Bethlehem, land of Judah,by no means are you least among the rulers of Judah,because from you will come one who governs,who will shepherd my people Israel."
Then Herod secretly called for the magi and found out from them the time when the star had first appeared.
He sent them to Bethlehem, saying, "Go and search carefully for the child. When you've found him, report to me so that I too may go and honor him."
When they heard the king, they went; and look, the star they had seen in the east went ahead of them until it stood over the place where the child was.
When they saw the star, they were filled with joy.
They entered the house and saw the child with Mary his mother. Falling to their knees, they honored him. Then they opened their treasure chests and presented him with gifts of gold, frankincense, and myrrh.
Because they were warned in a dream not to return to Herod, they went back to their own country by another route.
When the magi had departed, an angel from the Lord appeared to Joseph in a dream and said, "Get up. Take the child and his mother and escape to Egypt. Stay there until I tell you, for Herod will soon search for the child in order to kill him."
Joseph got up and, during the night, took the child and his mother to Egypt.
He stayed there until Herod died. This fulfilled what the Lord had spoken through the prophet: I have called my son out of Egypt.
When Herod knew the magi had fooled him, he grew very angry. He sent soldiers to kill all the male children in Bethlehem and in all the surrounding territory who were two years old and younger, according to the time that he had learned from the magi.
This fulfilled the word spoken through Jeremiah the prophet:
18A voice was heard in Ramah, weeping and much grieving. Rachel weeping for her children, and she did not want to be comforted, because they were no more.
After King Herod died, an angel from the Lord appeared in a dream to Joseph in Egypt.
"Get up," the angel said, "and take the child and his mother and go to the land of Israel. Those who were trying to kill the child are dead."
Joseph got up, took the child and his mother, and went to the land of Israel.
But when he heard that Archelaus ruled over Judea in place of his father Herod, Joseph was afraid to go there. Having been warned in a dream, he went to the area of Galilee.
He settled in a city called Nazareth so that what was spoken through the prophets might be fulfilled: He will be called a Nazarene.