Abraham—peace be upon him—had foretold that a child would arise from his descendants at whose hands the kingdom of Egypt would perish. God knows best, but this prophecy most likely dates back to the incident in which the king of Egypt sought to violate Sarah, the wife of the Friend of God (1), and God protected her. The glad-tidings became well known among the Children of Israel; the Copts repeated it among themselves until it reached Pharaoh. While he was sitting in conversation one evening, some of his princes and courtiers (2) reminded him of it, whereupon he ordered that every male infant born to the Israelites be slain, fearing the appearance of that boy—yet no precaution can avert what has been decreed (3).
Al-Suddi (4) narrated—from Abū Ṣāliḥ and Abū Mālik, from Ibn ʿAbbās, and from Murrah, from Ibn Masʿūd, and from other Companions—that Pharaoh saw in a dream a fire coming from the direction of Jerusalem. It consumed the houses of Egypt and all the Copts, yet left the Israelites unharmed. Terrified upon waking, he summoned the priests, augurs (5), and sorcerers and asked them about it. They said, “A boy will be born among these people who will bring about the ruin of Egypt.” For that reason he ordered the killing of their newborn males while sparing the females.
Concerning this, Allah the Exalted says:
“We wished to show favor to those who were oppressed in the land, to make them leaders and heirs, to establish them in the land, and to show Pharaoh, Hāmān, and their hosts through them what they had feared.” (al-Qaṣaṣ 5–6)
In other words, We shall make the weak strong, the subjugated dominant, and the humiliated honored.
Everything unfolded exactly so for the Children of Israel, as He also says:
“And We caused the people who had been oppressed to inherit the eastern parts of the land and its western parts, which We had blessed; thus the gracious word of your Lord was fulfilled for the Children of Israel because of the patience they had shown…” (al-Aʿrāf 137)
And He says:
“So We brought them out of gardens and springs, out of treasures and stately dwellings; thus did We bequeath them to the Children of Israel.” (ash-Shuʿarāʾ 57–59)
The detailed account will come in its proper place, if Allah wills.