When they had retired, see! The messenger of the Lord is appearing in a dream to Ioseph, saying, When you have awakened, take up the childling and his mother and escape into Aigyptos, and be over there until I command, for Herodes seeks the childling to annihilate him.
And awakening, he took up the childling and his mother by night and retired into Aigyptos. And there he was until the death of Herodes, so that there might be completed the uttering spoken by the Lord through the prophet, saying, Out of Egypt I have summoned my son.
Then Herodes, having seen that he was mocked by the Magians, was very enraged, and having sent out, murdered all the children that were in Bethleem and its whole area who were two years old and under, according to the time he had determined from the Magians. Thus was completed the uttering through the prophet Ieremian, saying, Noise in Rama was heard, much weeping and wailing, Rachel weeping for her offspring, and she has no wish to be comforted, for they are not at all.
When Herodes had died, see! The messenger of the Lord is appearing in a dream to Ioseph in Aigyptos, saying, When you have awakened, take up the childling and his mother and journey into the land of Israel, for they have died who have sought the life of the childling.
And awakening, he took up the childling and his mother and entered into the land of Israel. Having heard that Archelaos is ruling over Ioudaia in place of his father Herodes, he feared to go there. Now, having been warned in a dream, he retired into the region of Galilaia and, having come, he settled in a city called Nazaret. So thus to be completed that uttering through the prophets, that a Nazoraios will be summoned.
[Matthew 2:13-23, my rough translation. There is some interesting use of the contrast between Jesus being in Egypt and the Innocents not being in Rama. There was, of course, a significant Jewish population in Egypt, especially around Alexandria; there was even a secondary Jewish Temple at Leontopolis, dating from the time of the Maccabean revolt. There are clear parallels between this passage and the passage in which the angel appears in a dream to Joseph to tell him not to put the Virgin away. As is well known, this section is also part of a set of passages that have a repeated structure of {happening}{prophetic saying that the happening completes}.]