After the astrologers had left, the angel of the Lord suddenly appeared in a dream to Joseph with the command: "Get up, take the child and his mother, and flee to Egypt. Stay there until I tell you otherwise. Herod is searching for the child to destroy him." Joseph got up and took the child and his mother and left that night for Egypt. He stayed there until the death of Herod, to fulfill what the Lord had said through the prophet:
"Out of Egypt I have called my son."
Once Herod realized that he had been deceived by the astrologers, he became furious. He ordered the massacre of all the boys two years old and under in Bethlehem and its environs, making his calculations on the basis of the date he had learned from the astrologers. What was said through Jeremiah the prophet was then fulfilled:
"A cry was heard at Ramah,
sobbing and loud lamentation:
Rachel bewailing her children;
no comfort for her, since they are no more."
But after Herod's death, the angel of the Lord appeared in a dream to Joseph in Egypt with the command: "Get up, take the child and his mother, and set out for the land of Israel. He heard, however, that Archelaus had succeeded his father Herod as king of Judea, and he was afraid to go back there. Instead, because of a warning received in a dream, Joseph went to the region of Galilee. There he settled in a town called Nazareth. In this way what was said through the prophets was fulfilled:
"He shall be called a Nazorean."