Herod ’s reaction to news about someone being born king of the Jews was to order the death of every male child in Bethlehem under the age of two, according to the Bible. He based his order on information provided by Jewish priests and scribes in Jerusalem and astrologers from the East, called Magi.
The Magi studied the world's religious texts. Among them was a Jewish book that predicted the coming of a great king to rule the Jewish people. For centuries, Jewish prophets predicted this event, and it appeared the prophecies were coming true.
Herod foiled many previous plots to remain King. This included killing a wife and at least two of his children, but the Bible is the only source that references his massacring children in Bethlehem and its surrounding districts.
However, an angel appeared to Jesus’ father, Joseph, before the order was carried out, and instructed Joseph to flee to Egypt with his wife and young son, according to the Bible. The family remained in Egypt until Herod was dead. Joseph was then instructed by an angel to go back to Israel.
Because Herod’s son, Archelaus, had replaced Herod as ruler in Judea, Joseph and his family went instead to a town called Nazareth, in the district of Galilee.