Берешит 20:9 Мидраш: Bereshit Rabbah

וַיִּקְרָ֨א אֲבִימֶ֜לֶךְ לְאַבְרָהָ֗ם וַיֹּ֨אמֶר ל֜וֹ מֶֽה־עָשִׂ֤יתָ לָּ֙נוּ֙ וּמֶֽה־חָטָ֣אתִי לָ֔ךְ כִּֽי־הֵבֵ֧אתָ עָלַ֛י וְעַל־מַמְלַכְתִּ֖י חֲטָאָ֣ה גְדֹלָ֑ה מַעֲשִׂים֙ אֲשֶׁ֣ר לֹא־יֵֽעָשׂ֔וּ עָשִׂ֖יתָ עִמָּדִֽי׃

И призвал Авимелех Авраама и сказал ему: 'Что ты с нами сделал? и чем согрешил я против тебя, что ты навел на меня и на царство мое великий грех? Ты сделал мне дела, которые не должны были быть сделаны.'

Bereshit Rabbah

“Avimelekh had not approached her; he said: My Lord, will You kill a nation that is also innocent?” (Genesis 20:4).
“Avimelekh did not approach her…will You kill a nation even if it is innocent [tzadik]?” He said: If this is how You judged the generation of the Flood and the generation of the Dispersion, [perhaps] they [too] were innocent.21This explains why Avimelekh spoke of a "nation” being killed, despite the fact that it was he alone who was threatened. Rabbi Berekhya said: If you kill this nation,22According to this explanation, Avimelekh was referring to his own nation, who were all under threat (see Genesis 20:9). you would also kill a righteous man [tzadik].23Because I did nothing wrong.
“Did he not say to me: She is my sister? And she, also she said: He is my brother. In the innocence of my heart and in the cleanliness of my hands I did this” (Genesis 20:5).
“Did he not say to me: She is my sister? And she, also she…”24The words “also she” appear to be superfluous. – she, his donkey drivers, his camel drivers, the members of his household, and the members of her household, all of them said so.25The words “also she” mean: All these other people in addition to her.
“In the innocence of my heart” – that is to say that there was touching of the hands.26Avimelekh protested that his hands acted in innocence, implying that there was some form of action.

Bereshit Rabbah

“Avimelekh called Abraham, and said to him: What have you done to us, and by what have I sinned against you, that you have brought upon me and upon my kingdom a great sin? Deeds that should not be done, you have done to me” (Genesis 20:9).
“Avimelekh called Abraham, and said to him” – “what have I sinned against you?” “What have you done to us?” – this is [referring to] what it says: “You will die because of the woman that you have taken…” (Genesis 20:3). “What have I sinned against you?” – [this is referring to what it says:] “If you do not return her, know you that you will die” (Genesis 20:7). “That you have brought upon me and upon my kingdom a great sin [ḥata’a]” – “for the Lord had obstructed all wombs of the house of Avimelekh” (Genesis 20:18).29The Midrash interprets ḥata’a to mean punishment (see Zechariah 14:19). “Deeds that should not be done” – Rabbi Ḥelbo said: [Avimelekh said to Abraham:] ‘Everywhere else [you went], prosperity used to go before you,30That is, it used to accompany you. but [when you came] here, famine goes before you.’31Situations that did not usually occur elsewhere in your travels, have occurred here. ]That is what he meant by:] “Deeds that are not done [you have done to me].” [This paragraph is the explanation of the subsequent verse:] “Avimelekh said to Abraham: What did you see, that you did this matter?” (Genesis 20:10).