Sahih al-Bukhari, Hadith 4663 ⓘ
Narrated Abu Bakr: I was in the company of the Prophet in the cave, and on seeing the traces of the pagans, I said, "O Allah's Messenger If one of them (pagans) should lift up his foot, he will see us." He said, "What do you think of two, the third of whom is Allah?"
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا حَبَّانُ، حَدَّثَنَا هَمَّامٌ، حَدَّثَنَا ثَابِتٌ، حَدَّثَنَا أَنَسٌ، قَالَ حَدَّثَنِي أَبُو بَكْرٍ ـ رضى الله عنه ـ قَالَ كُنْتُ مَعَ النَّبِيِّ صلى الله عليه وسلم فِي الْغَارِ، فَرَأَيْتُ آثَارَ الْمُشْرِكِينَ قُلْتُ يَا رَسُولَ اللَّهِ، لَوْ أَنَّ أَحَدَهُمْ رَفَعَ قَدَمَهُ رَآنَا. قَالَ " مَا ظَنُّكَ بِاثْنَيْنِ اللَّهُ ثَالِثُهُمَا " .
also referenced under: Book 65, Hadith 4663 (In-Book) & Volume 6, Book 60, Hadith 185 (USC-MSA)