Joseph was forced to flee Bethlehem with Mary and the newborn Jesus to escape King Herod's decree to kill all baby boys under age two. They traveled to Egypt for Jesus' safety until Herod died. This fulfilled a prophecy that the Messiah would be called out of Egypt. Joseph then settled his family in Nazareth according to another prophecy that Jesus would be called a Nazarene. Though their lives faced difficulties, God had a purpose and plan in moving Joseph's family.