There were many Jewish people residing in Egypt, a place that historically served as a refuge, even for royalty. The gifts bestowed by the Magi provided the necessary funds for their journey. Ultimately, their faith in God, in the Child whose life they sought to preserve, and who was evidently precious in God's sight, helped them overcome any lingering fears. Consequently, under the cloak of night, as noted by the Evangelist Matthew, Joseph and his family hastily departed for Egypt, likely on the very night the angelic dream occurred.
Meanwhile, Jerusalem was in turmoil, with everyone from the king to the common citizen in a state of agitation. The king, particularly anxious, awaited news from the Magi about their pilgrimage. Others found themselves in varying states of anticipation: some were fearful due to Herod’s infamous reputation, while others felt joy and quiet assurance in God’s Providence, believing their longed-for hope would soon be revealed; still others were merely curious about the unfolding events. However, none of their hopes came to fruition. The king grew increasingly furious towards the Child, whom he saw as a rival to his throne or at least a competitor to his lineage. In his rage, he ordered the slaughter of all male infants under two years old in Bethlehem and its vicinity—a decree executed with such swiftness that parents hardly had time to protect their young ones from destruction. The reports about Jesus, once conveyed by credible witnesses, now left many uncertain about His very existence, especially in light of Joseph's sudden departure from Bethlehem.
Legend later ascribed numerous miraculous events to the time of Jesus’ flight and subsequent stay in Egypt. Eusebius and Athanasius recount that His arrival caused the idols to topple, emphasizing Isaiah’s prophecy (Isaiah 19:1). Sozomen narrates an incident in Hermopolis where a renowned tree bowed down to Jesus as He entered the city, its branches purportedly possessing healing properties until the time of Julian, who ordered it cut down. The Gospel of the Infancy of Jesus Christ tells tales of miracles:
1. When Joseph, Mary, and Jesus entered the first city of Egypt, the inhabitants were so shaken that they sought answers from their priest, who claimed, “the unknown God, who is the true God, has come here,” just before the idol collapsed. 2. A priest’s son, afflicted by demons, was freed from possession upon unintentionally brushing his head against one of Jesus’ veils, with the spirits manifesting as ravens and serpents. 3. In one city, Mary healed a woman tormented by evil spirits. 4. Another city saw a bride, silenced by sorcery, regain her speech through Jesus’ touch. 5. In a different location, a woman was delivered from a serpent-shaped evil spirit through the Child’s presence. 6. The son of the local governor received healing. 7. A newlywed, hindered in his marital rights, found resolution in another city. 8. In yet another place, a man, transformed into a mule due to jealousy, was restored to human form by Jesus. 9. While journeying in the wilderness, they encountered two robbers; one, intrigued by Jesus, offered money to his companion, only to be prayed for by Mary and foretold by Jesus as one of the two who would be crucified alongside Him. 10. One city, devoted to idol worship, was reduced to mounds of sand. 11. Jesus caused a spring to flow from a wild fig tree, providing balm after Mary washed His garments.
In summary, the narrative notes that “Joseph and his mother and child came to Memphis, they encountered Pharaoh there; they spent three years in Egypt, during which Jesus performed many miracles that are not chronicled in the Gospel of Childhood or the Gospel of the Perfect.” Yet, the accuracy of these accounts is questionable, as they seem inconsistent with Jesus’ condition at that time and often contain implausible elements. If Jesus had intended to conceal His miraculous abilities, why then did He flee to Egypt? With the same divine power, He could have defended Himself in Judea and vanquished His adversaries as He had done to the idolatrous city there. Therefore, the full duration of Jesus’ journey to Egypt and His time spent there remains largely a mystery, with no certainty regarding the length of His stay.