I will harden Pharaoh's heart, Nechama Leibowitz
(ג) וַאֲנִ֥י אַקְשֶׁ֖ה אֶת־לֵ֣ב פַּרְעֹ֑ה וְהִרְבֵּיתִ֧י אֶת־אֹתֹתַ֛י וְאֶת־מוֹפְתַ֖י בְּאֶ֥רֶץ מִצְרָֽיִם׃
(3) But I will harden Pharaoh’s heart, that I may multiply My signs and marvels in the land of Egypt.

"For I have hardened his heart" Said R. Yochanan: This provides an opening for the heretics who say: Pharaoh was not allowed by God to repent"...

Ramban: If God hardened Pharaoh's heart, what was his crime?

(א) ואני אקשה הנה בהיות האל חפץ בתשובת רשעים ולא במיתתם, כאמרו חי אני נאם ה', אם אחפוץ במות הרשע, כי אם בשוב הרשע מדרכו וחיה, אמר שירבה את אותותיו ואת מופתיו, וזה להשיב את המצרים בתשובה, בהודיע להם גדלו וחסדו באותות ובמופתים, כאמרו בעבור זאת העמדתיך, בעבור הראותך את כחי ועם זה היתה הכונה שישראל יראו וייראו, כאמרו למען שיתי אותותי אלה בקרבו, ולמען תספר, ואין ספק שלולא הכבדת הלב היה פרעה משלח את ישראל בלי ספק, לא על צד תשובה והכנעה לאל יתברך, שיתנחם מהיות מורד, אף על פי שהכיר גדלו וטובו, אלא על צד היותו בלתי יכול לסבול עוד את צרת המכות, כמו שהגידו עבדיו באמרם הטרם תדע כי אבדה מצרים וזאת לא היתה תשובה כלל. אבל אם היה פרעה חפץ להכנע לאל יתברך, ולשוב אליו בתשובה שלמה, לא היה לו מזה שום מונע. והנה אמר האל יתברך ואני אקשה את לב פרעה, שיתאמץ לסבול המכות ולא ישלח מיראת המכות את ישראל, למען שיתי אותותי אלה בקרבו, שמהם יכירו גדלי וטובי וישובו המצרים באיזו תשובה אמתית. ולמען תספר אתה ישראל הרואה בצרתם, באזני בנך להודיע שכל אלה יפעל אל עם גכר להשיבו אליו, וזה כשיפשפשו במעשיהם בבוא עליהם איזה פורענות:

(1) ואני אקשה, seeing that G’d is interested in the sinner’s repentance rather than his death (as we know from Ezekiel 33,11 חי אני, נאום ה', אם אחפוץ במות הרשע כי אם בשובו מדרכו וחיה, “by My life, I do not want the death of the wicked but that he return from his wicked path and live”), G’d told Moses that He would bring on numerous plagues, all in order to increase the chances that Pharaoh would finally see the light and become a genuine penitent. He hoped that by demonstrating His greatness and His power this would eventually cause the Egyptians to recognize all this. ... There can be no question that without G’d stiffening Pharaoh’s attitude from time to time, he would have collapsed much sooner and would have sent the Israelites on their desired journey. However, this would not have been the result of his repentance and humbling himself before the Lord, involving genuine regret about his previous errors, but the result of his inability to withstand the pressure applied to him. He would have acted out of terror of what the next plague would do to him and to his country. If we needed confirmation of this, all we have to do is look at what his servants said to him when Moses threatened with the plague of locust. They said to him: “how long will you be obstinate, do you not see that Egypt will go down the drain?!” There was not a single word of regret of past errors, no word of recognition that G’d could have killed them all long before this and that He must therefore be very patient, and kind, but mere terror forced them to utter these words. (10,7) Keeping all this in mind, it is foolish to ask how G’d could punish Pharaoh after he Himself had interfered with his decision-making process by “stiffening his heart,” ואני אקשה את לב פרעה, I will stiffen the heart of Pharaoh, etc.” not in order to punish him but in order to finally trigger repentance in his heart. The operative clause is “in order that I can demonstrate all these miracles of Mine in his midst” (10,1), the purpose being to bring about his humbling himself in repentance and genuine contrition.

אמנם האמת אשר אין ספק בו שפעולות האדם כלם מסורות לו אם ירצה יעשה ואם ירצה לא יעשה מבלתי הכרח שיכריחוהו עליו,

In reality, the undoubted truth of the matter is that man has full sway over all his actions. If he wishes to do a thing, he does it; if he does not wish to do it, he need not, without any external compulsion controlling him.

אבל אמרו וחזקתי את לב פרעה וגו' ואחר כך ענשו והמיתו יש בו מקום לדבר ויעלה ממנו בידינו שורש גדול, והסתכל מאמרי בזה הענין, ושים אליו לבך, וחבר אותו על דברי זולתי ובחר לך הטוב, והוא שפרעה וסיעתו אלו לא היה להם חטא אלא זה שלא שלחו ישראל, היה הענין מסופק על כל פנים שהוא מנעם מלשלוח אותם כמו שאמר כי אני הכבדתי את לבו ואת לב עבדיו, ואחר כן היה מבקש ממנו לשלחם, והוא מוכרח שלא לשלחם, ואחר כך לענשו כאשר לא שלחם ולהמיתו הוא וכל סיעתו זה היה עול בלא ספק וסותר לכל מה שהקדמנו, אלא נשאר שאין הענין כן, אבל פרעה וסיעתו מרו בבחירתם מבלי הכרח, וחמסו הגרים אשר היו בתוכם ועולו עליהם עול גמור כמו שאמר בביאור, ויאמר אל עמו הנה עם בני ישראל רב ועצום ממנו הבה נתחכמה לו וגו', וזאת הפעולה היתה מהם בבחירתם וברוע לבבם ולא היתה עליהם בזה הכרחה, והיה עונש השם להם על זה למנעם מן התשובה עד שיחול עליהם מן העונש מה שהיה ראוי להם מן הדין שזה ענשם, ומניעתם מן התשובה הוא שלא ישלחם, וכבר ביאר השם זה והודיעו שאלו היה רוצה להוציאם לבד היה מאבד אותו וסיעתו והיו יוצאים, ואמנם רצה עם הוציא אותם לענשו על חמסם הקודם כמו שאמר בתחלת הענין, וגם את הגוי אשר יעבודו דן אנכי וגו', ואי אפשר לענשם אלו היה עושים תשובה ועל כן נמנעו מן התשובה והחזיקו בהם, והוא אמרו כי עתה שלחתי את ידי וגו', ואולם בעבור זאת העמדתיך וגו':

As regards, however, the words of God, (Exodus 14:4) "and I will harden the heart of Pharaoh", afterwards punishing him with death, there is much to be said, and from which there may be deduced an important principle. ... If Pharaoh and his counsellors had committed no other sin than that of not permitting Israel to depart, I admit that the matter would be open to great doubt, for God had prevented them from releasing Israel according to the words, (Exodus 10:1) "For I have hardened his heart and the hearts of his servants". After that, to demand of Pharaoh that he send them forth while he was forced to do the contrary, and then to punish him because he did not dismiss them, finally putting him and all his followers to death, would undoubtedly be unjust, and would completely contradict all that we have previously said. Such, however, was not the real state of affairs, for Pharaoh and his followers, already of their own free will, without any constraint whatever, had rebelled by oppressing the strangers who were in their midst, having tyrannized over them with great injustice, as Scripture plainly states, (Exodus 1:9-10) "And he said unto his people, Behold, the people of the children of Israel is more numerous and mightier than we, come let us deal wisely with it". This they did through the dictates of their own free will and the evil passions of their hearts, without any external constraint forcing them thereto. The punishment which God then inflicted upon them was that He withheld from them the power of repentance, so that there should fall upon them that punishment which justice declared should he meted out to them. The fact that they were prevented from repenting manifested itself by Pharaoh's not dismissing them. This God had explained and told him, namely, that if He had merely wished to liberate Israel, He would have destroyed him and his adherents, and He would have brought out the Israelites; but, in addition to the liberation of his people, God wished to punish him because of his previous oppression of Israel, as it is said at the beginning of the matter, (Genesis 15:14) "And also that nation whom they shall serve will I likewise judge". It would have been impossible to have punished them, if they had repented; therefore repentance was withheld from them, and they continued to keep the children of Israel in bondage, as it says, (Exodus 9:15-16) "For even now I have stretched out my hand, etc. . . . but for this cause have I allowed thee to remain".

(טו) ואין לדקדק עלינו אם נאמר שהשם יענש האדם שימנעהו מן התשובה, ולא יניח אליו בחירה בתשובה, כי הוא ית' ידע החטאים, ולפי חכמתו וישרו יהיה שעור העונש, פעמים יענש בעולם הזה לבד ופעמים יענש בעולם הבא לבד, ופעמים יענש בשניהם, וענשו בעולם הזה חלוק, פעמים יענש בחוף, ופעמים בממון או בשניהם יחד, וכמו שיבטל קצת תנועות האדם שהן בבחירתו על צד העונש, כבטל ידו מן המלאכה (שלא יוכל לעשות בו דבר) כמו שעשה בירבעם, או (יסמא) עינו מן הראות כמו שעשה באנשי סדום הנקבצים על לוט, כן יבטל ממנו בחירת התשובה עד שלא יתעורר אליה כלל וימות בחטאו, ולא נתחייב לדעת חכמתו, עד שנדע למה ענש בה המין מן העונש ולא ענש במין אחר, כמו שלא נדע מה הסבה בהיות לזה המין זאת הצורה ולא היתה לו צורה אחרת, אבל הכלל כי כל דרכיו משפט, ויענש החוטא כפי חטאו ויגמול המטיב כפי הטבתו. ואם תאמר למה בקש ממנו לשלוח את ישראל פעם אחר פעם והוא נמנע מלשלחם, ולמה באו המכות עליו והוא עומד (במרדו) על עקשותו, כמו שאמרנו שענשו היה שיעמוד על עקשותו, ולא היה מבקש ממנו לבטלה מה שאי אפשר לעשותו, זה גם כן היה לחכמה מהשם ית' שיודיעהו שהשם יבטל בחירתו כשירצה לבטלה, ואמר לו אני מבקש ממך שתשלחם, ולו שלחת היית נצול, אלא אתה לא תשלחם עד שתמות, והיה צריך הוא שיודה (לשלחם) עד שיראה הפך דבר הנביא שהוא נמנע להודות, ולא היה יכול, והיה בזה אות גדולה מפורסמת אצל כל בני אדם כמו שאמר, ולמען ספר שמי בכל הארץ, שהשם אפשר שיענש האדם שימנעהו בחירת פעולה אחת, וידע הוא בה ולא יוכל למשוך נפשו ולהשיבה אל הבחירה ההיא. ועל זה הצד בעצמו היה עונש סיחון מלך חשבון, כי למה שקדם ממריו אשר לא הוכרח עליו ענשו השם שמנעו מהפיק רצון ישראל עד שהרגוהו, והוא אמרו ולא אבה סיחון העבירנו בו וגו', ואשר היה קשה על המפרשים כלם בחשבם שסיחון נענש כשלא הניח את ישראל לעבור בארצו ואמר איך יענש והוא מוכרח, כמו שחשבו שפרעה נענש הוא וסיעתו על אשר לא שלחו את ישראל, ואין הענין כן, אלא כמו שבארנו שפרעה וסיעתו היה ענשם מהשם על מה שקדם מחטאתם שלא ישובו עד שיבואו עליהם כל אלה המכות והיה עונש סיחון על מה שקדם מחטאתו אל עולו במלכותו שמנע לעשות רצון ישראל עד הרגוהו:

(15) No one can find fault with us when we say that God at times punishes man by withholding repentance from him, thus not allowing him free will as regards repentance, for God (blessed be He) knows the sinners, and His wisdom and equity mete out their punishment. Sometimes, He punishes only in this world, sometimes only in the world to come, sometimes in both. Furthermore, His punishment in this world is varied, sometimes being bodily, sometimes pecuniary, and sometimes both at once. Just as some of man's undertakings, which ordinarily are subject to his own free will, are frustrated by way of punishment, as for instance a man's hand being prevented from working so that he can do nothing with it, as was the case of Jereboam, the son of Nebat (I Kings 13:4), or a man's eyes from seeing, as happened to the Sodomites who had assembled about Lot (Genesis 19:11), likewise does God withhold man's ability to use his free will in regard to repentance, so that it never at all occurs to him to repent, and he thus finally perishes in his wickedness. It is not necessary for us to know about God's wisdom so as to be able to ascertain why He inflicts precisely such punishment as He does and no other, just as little as we know why one species has a certain particular form and not another. It is sufficient for us to know the general principle, that (Deuteronomy 32:4) "God is righteous in all His ways," that He punishes the sinner according to his sin, and rewards the pious according to his righteousness. If you should inquire why God repeatedly asked Pharaoh to release Israel which he was unable to do while he, in spite of the plagues which befell him, persisted in his rebellion and stubbornness, which very rebelliousness and stubbornness was his punishment and yet God would not in vain have asked him to do a thing which he could not do, then know that , this, too, was a part of God's wisdom, to teach Pharaoh that God can suspend man's freedom of will when it pleases Him to do so. So, God said to him (through Moses), "I desire that thou shouldst liberate them, but thou wilt not dismiss them, so that thou shouldst die". Pharaoh should have consented to release them, and therely disprove the words of the prophet (Moses) that he was unable to obey, but he had not the power. Thus, a great wonder was revealed to the people, as it is said, (Exodus 9:16) "In order that they may proclaim my name throughout the earth", namely, that it is possible for God to punish man by depriving him of his free will respecting a certain deed, while he, though realizing it, is, however, unable to influence his soul, and return to his former state of freedom of the will. Such was, likewise, the punishment of Sihon, King of Heshbon; ...Pharaoh and his adherents were punished by G-od because of their previous oppression of Israel, of which they did not repent, so that there befell them all the plagues; ...

Talmud Bavli Shabbat 104: Resh Lakish says: The verse which states 'at scoffers He scoffs' means as follows: If a person tries to defile himself, he is given an opening; if he tries to purify himself he is helped from above.