Bereshit / Genesis 12:17 · Remez
וַיְנַגַּע יְהוָה אֶת־פַּרְעֹה נְגָעִים גְּדֹלִים וְאֶת־בֵּיתוֹ עַל־דְּבַר שָׂרַי אֵשֶׁת אַבְרָם׃
And the Eternal struck Pharaoh and his house with great plagues, because of Sarai, Avram's wife.
Remez רֶמֶז
A palm tree in four words
"Al dvar Sarai eshet Avram" (עַל דְּבַר שָׂרַי אֵשֶׁת אַבְרָם), "because of Sarai, Avram's wife". A Hasidic teacher looks at the last letters of these words and finds a word in them.
Be'er Mayim Chaim: the last letters of the four words, ר, י, ת, ם, form "tamri" (תמרי), "my palm". The midrash teaches: the righteous are like a palm, and whoever climbs it carelessly falls. Sarai chose these very words, and the angel understood what to do. So she did not fear for Avram either. Rashi: "al dvar" means "by her word" (דִּבּוּר): she would tell the angel "strike", and he struck.
How Be'er Mayim Chaim and Rashi explain it
Be'er Mayim Chaim
"And the Eternal struck Pharaoh" and so on, "because of Sarai, Avram's wife". The sages of blessed memory said (Bereshit Rabbah 41:2): Rabbi Levi said: all that night an angel stood with a lash in his hand (meaning a strap or a stick) and said to Sarah: if you say "strike", I strike, and so on (and Rashi explained: "because of Sarah", by her word: she tells the angel "strike", and he strikes, and so on), up to "and why all this? Because she would say to him: I am a married woman, and he would not keep away", and so on. We must understand why Sarah did something her husband Avraham did not want, for he had asked her: "say that you are my sister", all the more so in a place of danger, where Avraham feared he would be killed because of it. And it seems that they said there (there, 41:1): "the righteous will flourish like a palm" (Tehillim / Psalms 92:13): as with this palm, when a person climbs to its top and does not guard himself, he falls and dies, so everyone who comes to attach himself to Israel in the end receives his due at their hands. Know that it is so: for because Pharaoh took Sarah for one night, he and his house were struck with plagues, as it is written "and the Eternal struck Pharaoh" and so on. Therefore Sarai deliberately said these words, "al dvar Sarai eshet Avram", whose last letters are "tamri" (תמרי), to hint at this: the righteous are likened to a palm, and whoever comes to attach himself to them receives his due from them. And with this word the angel struck him: since she mentioned the palm in her speech, the angel knew he must do to him as to one who climbs a palm. And so her heart was firm, trusting in the Eternal, that surely they could do nothing to Avraham either, just as they could do nothing to her. That is why she said it so.
Rashi Because of Sarai
By her word: she tells the angel "strike", and he strikes.
Takeaway
The last letters: ר from דְּבַר, י from שָׂרַי, ת from אֵשֶׁת, ם from אַבְרָם. Rearrange them and you get תמרי, "my palm" (תָּמָר).
"The righteous will flourish like a palm, grow tall like a cedar in Lebanon" (Tehillim / Psalms 92:13). The midrash Bereshit Rabbah (41:1) opens the story of Pharaoh with this verse.
The word "dvar" (דְּבַר) means both "matter" and "word". Rashi takes the second meaning: the plagues came at Sarai's word.