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."
References for Matthew 2:13
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.
References for Matthew 2:15
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.
References for Matthew 2:16
This fulfilled the word spoken through Jeremiah the prophet:
A 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.
References for Matthew 2:18
After King Herod died, an angel from the Lord appeared in a dream to Joseph in Egypt.
References for Matthew 2:19
"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."