Herod planned to kill the baby Jesus, whom he perceived to be a future threat to his position. Warned of this treachery in a dream, Joseph took his family to Egypt until Herod’s death, which occurred a year or two later. They then planned to return to Judea, but God led them instead to Nazareth in Galilee.