Joseph and Mary`s Flight Into Egypt

After the Magi had departed the Angel of the Lord appeared to Joseph in a dream and told him to take Jesus and his mother into the land of Egypt until He sent word that it would be safe to return. He warned that Herod would try to find the child to murder him. Joseph obeyed the Lord and took Jesus and his mother by night and departed for the land of Egypt. This event was foretold by the prophets.

Link: https://bible-history.com/new-testament/the-childhood-of-jesus