Language:
كتاب الاعتكاف
33  
Retiring to a Mosque for Remembrance of Allah (I'tikaf)
(8)
Chapter: Mu'takif going to the gate of the mosque.
(8)
باب هَلْ يَخْرُجُ الْمُعْتَكِفُ لِحَوَائِجِهِ إِلَى باب الْمَسْجِدِ
Sahih al-Bukhari 2035

Narrated `Ali bin Al-Husain:

Safiya, the wife of the Prophet (ﷺ) told me that she went to Allah's Messenger (ﷺ) to visit him in the mosque while he was in I`tikaf in the last ten days of Ramadan. She had a talk with him for a while, then she got up in order to return home. The Prophet (ﷺ) accompanied her. When they reached the gate of the mosque, opposite the door of Um-Salama, two Ansari men were passing by and they greeted Allah's Apostle . He told them: Do not run away! And said, "She is (my wife) Safiya bint Huyai." Both of them said, "Subhan Allah, (How dare we think of any evil) O Allah's Messenger (ﷺ)!" And they felt it. The Prophet said (to them), "Satan reaches everywhere in the human body as blood reaches in it, (everywhere in one's body). I was afraid lest Satan might insert an evil thought in your minds."

حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، قَالَ أَخْبَرَنِي عَلِيُّ بْنُ الْحُسَيْنِ ـ رضى الله عنهما ـ أَنَّ صَفِيَّةَ، زَوْجَ النَّبِيِّ صلى الله عليه وسلم أَخْبَرَتْهُ أَنَّهَا جَاءَتْ رَسُولَ اللَّهِ صلى الله عليه وسلم تَزُورُهُ فِي اعْتِكَافِهِ فِي الْمَسْجِدِ، فِي الْعَشْرِ الأَوَاخِرِ مِنْ رَمَضَانَ، فَتَحَدَّثَتْ عِنْدَهُ سَاعَةً، ثُمَّ قَامَتْ تَنْقَلِبُ، فَقَامَ النَّبِيُّ صلى الله عليه وسلم مَعَهَا يَقْلِبُهَا، حَتَّى إِذَا بَلَغَتْ باب الْمَسْجِدِ عِنْدَ باب أُمِّ سَلَمَةَ مَرَّ رَجُلاَنِ مِنَ الأَنْصَارِ، فَسَلَّمَا عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ لَهُمَا النَّبِيُّ صلى الله عليه وسلم ‏"‏ عَلَى رِسْلِكُمَا إِنَّمَا هِيَ صَفِيَّةُ بِنْتُ حُيَىٍّ ‏"‏‏.‏ فَقَالاَ سُبْحَانَ اللَّهِ يَا رَسُولَ اللَّهِ‏.‏ وَكَبُرَ عَلَيْهِمَا‏.‏ فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ إِنَّ الشَّيْطَانَ يَبْلُغُ مِنَ الإِنْسَانِ مَبْلَغَ الدَّمِ، وَإِنِّي خَشِيتُ أَنْ يَقْذِفَ فِي قُلُوبِكُمَا شَيْئًا ‏"‏‏.‏
Reference : Sahih al-Bukhari 2035
In-book reference : Book 33, Hadith 10
USC-MSA web (English) reference : Vol. 3, Book 33, Hadith 251
  (deprecated numbering scheme)