What was HaSh-m's response?
Rashi: Firstly, Avimelech was not entirely innocent. And secondly, although he was not guilty of having relations with Sarah, it was only because HaSh-m stopped him (physically) from doing so.
QUESTIONS ON RASHI
Rashi writes: "'I know that you acted innocently' - It is true that you did not initially plan to sin - but [your] hands are not clean in this [matter]." How do we know that this is the Pasuk's intent?
Gur Aryeh: The verse continues, "... and also I prevented you from sinning." It cannot mean that only because Avimelech acted innocently, HaSh-m prevented him from sin (i.e. but had he been intentional, He would not have stopped him). Rather it means that Avimelech's hands were not clean; he would ultimately have sinned, had HaSh-m not restrained him.
Rashi writes: "'Lo Nesati'cha' - It was not from you... rather... I did not give you the ability." What is Rashi explaining?
Gur Aryeh: "Lo Nesati'cha" usually means, 'I did not give you [to another].' Here it means, "I did not give [permission] to you" (i.e. I did not allow you).