Al-A’raf: 134
"And when the scourge fell upon them" — that is, the aforementioned punishment in detail, as has been narrated from al-Hasan, Qatadah, and Mujahid. The word "when" (lamma) does not negate the details and repetition, as is not hidden.
It is narrated from Abu Abdullah—may Allah the Exalted be pleased with him—that they were afflicted by red snow, the likes of which they had never seen before, and many of them perished because of it. From Ibn Jubayr, it is narrated that it was the plague, and its application to this is supported by the marfu’ hadith of Usama ibn Zayd: "The plague is a scourge sent upon a faction of the Children of Israel, or upon those who were before you. If you hear of it in a land, do not enter it, and if it occurs in a land where you are, do not leave, fleeing from it."
Ibn Abi Hatim recorded from Ibn Abbas, who said: Moses (peace be upon him) commanded the Children of Israel, saying: "Let each of you slaughter a ram, then dye your palm in its blood, then strike it upon your door." They did so. The Copts said to them: "Why do you put this blood upon your doors?" They replied: "Allah the Exalted intends to send upon you a punishment, so we shall be saved and you shall perish." The Copts said: "Does Allah the Exalted not recognize you except by this sign?" They answered: "This is what our Prophet has commanded us." By morning, seventy thousand of the people of Pharaoh had been struck [with the plague], and by evening they were unable to bury one another. According to the first interpretation, the meaning is that whenever any of the aforementioned punishments fell upon them:
"They said, 'O Moses,'" — each time, according to the view that what is meant by "the scourge" is something other than what had already passed—meaning that when the destructive snow or the sweeping plague fell upon them, they said:
"Pray to your Lord for us by that which He has promised you" — that is, by His promise (Glory be to Him) with you, which is Prophethood, as Abu Muslim said, in which case "what" (ma) is an infinitive particle. Prophethood is called a "covenant" (‘ahd)—as the second scholar said—because Allah the Exalted covenanted to honor the Prophets (peace be upon them) with it, and they covenanted to Him to bear its burdens; or because it has rights that must be preserved just as covenants are preserved; or because it is in the position of a covenant and a decree from Him (Majestic and Exalted is He). Or, [it means] "by that which He promised you, that you pray to Him and He will answer you, just as He answered you in your signs," in which case "what" is a relative pronoun, and the prepositional phrase is connected to "pray" or is a circumstantial qualifier for the pronoun within it—meaning: "Pray to Allah the Exalted, seeking to draw near to Him by that which He has promised you."
It is also possible that the 'ba' (in bima) is for an emotive oath, as when one says, "By your life, do such and such." In this case, the intention is to appeal to him (peace be upon him) to pray. It may also be a literal oath, the response to which is:
"If You remove the scourge from us" — which has fallen upon us — "we will surely believe you and we will surely send with you the Children of Israel" — that is, "We swear by the covenant of Allah with you: if You remove," and so on. The summary of what they mentioned regarding the 'ba' here is that it is either for attachment, for causality, or for an oath in its two forms.