Shemot9:27

וַיִּשְׁלַח פַּרְעֹה וַיִּקְרָא לְמֹשֶׁה וּלְאַהֲרֹן וַיֹּאמֶר אֲלֵהֶם חָטָאתִי הַפָּעַם יְהוָה הַצַּדִּיק וַאֲנִי וְעַמִּי הָרְשָׁעִים׃

And Pharaoh sent and called for Moshe and for Aharon and said to them: "I have sinned this time. The Eternal is righteous, and I and my people are in the wrong.

Shemot 9:27

וַיִּשְׁלַח פַּרְעֹה וַיִּקְרָא

Shemot / Exodus 9:27

וַיִּשְׁלַח פַּרְעֹה וַיִּקְרָא לְמֹשֶׁה וּלְאַהֲרֹן וַיֹּאמֶר אֲלֵהֶם חָטָאתִי הַפָּעַם יְהוָה הַצַּדִּיק וַאֲנִי וְעַמִּי הָרְשָׁעִים׃

And Pharaoh sent and called for Moshe and for Aharon and said to them: "I have sinned this time. The Eternal is righteous, and I and my people are in the wrong.

Pshat פְּשָׁט

What Pharaoh confessed

Rashbam: now, this time, I admit that I have sinned. Malbim: Pharaoh did not count holding Israel as a sin: they were his slaves. But the Eternal had warned him to bring people and cattle into the houses, out of pity, so that people would not die for nothing. Pharaoh and his people did not listen, and many people died. This is what he confessed: the Eternal is righteous and took pity on His creatures, while I and my people are guilty of shedding innocent blood.

How Rashbam and Malbim explain it

Remez רֶמֶז

Why "righteous" only now

Chizkuni: of all the plagues, only at the hail did Pharaoh say "the Eternal is righteous." One who wants to fight another and kill him attacks without warning. But the Eternal Himself told Pharaoh: "Send, gather in your cattle." Da'at Zekenim: so Pharaoh said: the Eternal is righteous, He warned me well. And I and my people are in the wrong: we left the cattle in the fields and did not believe the Holy One, blessed is He.

How Chizkuni and Da'at Zekenim explain it

Drash דְּרָשׁ

The same mouth

Midrash Tanchuma (Buber): the Holy One, blessed is He, said to Pharaoh: you said "who (מִי)," and by the waters (מֵי) of the sea you will be punished, in the sea you will know who I am. You said "I do not know the Eternal," and tomorrow you will say "the Eternal is righteous." You said "I will not let them go," and tomorrow you yourself will send off each one. Rashi: because the Egyptians said "the Eternal is righteous," they merited burial.

How Midrash Tanchuma (Buber) and Rashi explain it

Sod סוֹד

Ten utterances, ten plagues, ten commandments

Sefat Emet: the world was created with ten utterances, to exact payment from the wicked and to give good reward to the righteous. The wicked here is Pharaoh: "I and my people are in the wrong." And the good reward for the righteous is the Torah, which is called "good." Before the sin the world could have been created with one utterance. But the Holy One, blessed is He, saw that man would sin and good would mix with evil. So the ten general utterances later divided: the side of evil became ten plagues for the wicked, and the good became the ten utterances at Sinai. To bring holiness into every deed, one must first repair the side of evil, the ten plagues.

How Sefat Emet explain it