Language:
كتاب الإكراه
89  
(Statements made under) Coercion
(6)
Chapter: If a woman is compelled to commit illegal sexual intercourse against her will
(6)
باب إِذَا اسْتُكْرِهَتِ الْمَرْأَةُ عَلَى الزِّنَا، فَلاَ حَدَّ عَلَيْهَا
Sahih al-Bukhari 6950

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "(The Prophet) Abraham migrated with his wife Sarah till he reached a town where there was a king or a tyrant who sent a message, to Abraham, ordering him to send Sarah to him. So when Abraham had sent Sarah, the tyrant got up, intending to do evil with her, but she got up and performed ablution and prayed and said, 'O Allah ! If I have believed in You and in Your Apostle, then do not empower this oppressor over me.' So he (the king) had an epileptic fit and started moving his legs violently. "

حَدَّثَنَا أَبُو الْيَمَانِ، حَدَّثَنَا شُعَيْبٌ، حَدَّثَنَا أَبُو الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ هَاجَرَ إِبْرَاهِيمُ بِسَارَةَ، دَخَلَ بِهَا قَرْيَةً فِيهَا مَلِكٌ مِنَ الْمُلُوكِ أَوْ جَبَّارٌ مِنَ الْجَبَابِرَةِ، فَأَرْسَلَ إِلَيْهِ أَنْ أَرْسِلْ إِلَىَّ بِهَا‏.‏ فَأَرْسَلَ بِهَا، فَقَامَ إِلَيْهَا فَقَامَتْ تَوَضَّأُ وَتُصَلِّي فَقَالَتِ اللَّهُمَّ إِنْ كُنْتُ آمَنْتُ بِكَ وَبِرَسُولِكَ فَلاَ تُسَلِّطْ عَلَىَّ الْكَافِرَ، فَغُطَّ حَتَّى رَكَضَ بِرِجْلِهِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6950
In-book reference : Book 89, Hadith 11
USC-MSA web (English) reference : Vol. 9, Book 85, Hadith 82
  (deprecated numbering scheme)