12:17

וַיְנַגַּע יְהוָה אֶת־פַּרְעֹה נְגָעִים גְּדֹלִים וְאֶת־בֵּיתוֹ עַל־דְּבַר שָׂרַי אֵשֶׁת אַבְרָם׃

And the Eternal struck Pharaoh and his house with great plagues, because of Sarai, Avram's wife.

Bereshit 12:17

וַיְנַגַּע יְהוָה אֶת־פַּרְעֹה

Bereshit / Genesis 12:17 · Drash

Bereshit 12:17

וַיְנַגַּע יְהוָה אֶת־פַּרְעֹה נְגָעִים גְּדֹלִים וְאֶת־בֵּיתוֹ עַל־דְּבַר שָׂרַי אֵשֶׁת אַבְרָם׃

And the Eternal struck Pharaoh and his house with great plagues, because of Sarai, Avram's wife.

Drash דְּרָשׁ

The angel waits for her word

Sarai is alone in Pharaoh's palace, and Avram is far away. The midrash tells what happened that night, and why the Torah says "by the word of Sarai".

Tanchuma: at that hour an angel came down with a staff. Each time Pharaoh reached for Sarai, the angel struck him, and before each blow he asked Sarai. So it says "al dvar" (עַל דְּבַר), "by the word" of Sarai. The plagues struck his officers too, and even the walls and vessels of the palace. Lekach Tov: even the beams of his house were struck, and all night the angel stood, struck him and said: "because of Sarai, Avram's wife".

How Midrash Tanchuma and Midrash Lekach Tov explain it

Midrash Tanchuma

"And Pharaoh and his house I will make an example", as it is written: "and the Eternal struck Pharaoh and his house with great plagues, because of Sarai". What is "al dvar Sarai"? At that hour an angel came down from heaven with a staff in his hand. Pharaoh came to take off her shoe, and the angel struck his hand. He came to touch her clothes, and the angel struck him. And the angel consulted Sarah about every single blow. From where do we know? For so it is written: "al dvar Sarai". It does not say "by Sarai's speech", nor "on account of", nor "concerning", nor "for the sake of", nor "because of", but "al dvar Sarai". If Sarai said he should strike, he struck him. And if she said he should wait a little, he did so. And even the governors, the officers and all his household were struck with him, as it is written: "and the Eternal struck Pharaoh with great plagues": all the plagues that have come and will come upon people came upon him. "And his house": to include servants, and walls, and pillars, and vessels, and everything, to fulfil what is said: "no harm befalls the righteous, but the wicked are filled with evil" (Mishlei / Proverbs 12:21).

Midrash Lekach Tov And his house

Rabbi Acha said: even the beams of his house were struck.
Because of Sarai, Avram's wife.
Rabbi Levi said: all that night the angel stood and struck him, and said to him: "because of Sarai, Avram's wife".

Takeaway

The midrash Bereshit Rabbah (41:2) tells that Sarah prayed all night: "Master of the worlds! Avraham went out with a promise, and I went out with faith." And the Holy One, blessed is He, answered her: "All that I do, I do for your sake."
Avram did not leave Egypt empty-handed: "And Avram was very heavy with livestock, with silver and with gold" (13:2).
Tanchuma sees a rule here: "no harm befalls the righteous" (Mishlei / Proverbs 12:21). Sarai was alone in the palace, but not alone before the Eternal.