Why did Mary, Joseph, and the infant Jesus flee to Egypt?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

Mary, Joseph, and the infant Jesus fled to Egypt to escape the violence of King Herod.12

According to the Gospel According to Matthew, Herod was threatened by the news of the birth of a child described as the "king of the Jews," which he perceived as a challenge to his rule. After the Magi failed to report the child's location to him, Herod ordered the massacre of all male children in Bethlehem who were two years old or younger. Joseph was warned of this impending danger by an angel in a dream, prompting the Holy Family to seek refuge in Egypt until they were later instructed to return to the Holy Land following Herod's death.321