Matthew 2:12-15 (KJV)
12 And being warned of God in a dream that they should not return to Herod, they departed into their own country another way.
13 And when they were departed, behold, the angel of the Lord appeareth to Joseph in a dream, saying, Arise, and take the young child and his mother, and flee into Egypt, and be thou there until I bring thee word: for Herod will seek the young child to destroy him.
14 When he arose, he took the young child and his mother by night, and departed into Egypt:
15 And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son.