Sahih Muslim #6169 · The Book of the Merits of the Companions

Sahih MuslimAnas b. Malik reported that Abu Bakr Siddiq reported him thus
Sahih Muslim · Book 44 · The Book of the Merits of the Companions
Sahih Muslim · كتاب 44 · كتاب فضائل الصحابة
I saw the feet of the polytheists very close to us as we were in the cave. I said: Allah's Messenger, if one amongst them were to see at his feet he would have surely seen us. Thereupon he said: Abu Bakr, what can befall two who have Allah as the third One with them.
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، وَعَبْدُ بْنُ حُمَيْدٍ، وَعَبْدُ اللَّهِ بْنُ عَبْدِ الرَّحْمَنِ الدَّارِمِيُّ، قَالَ عَبْدُ اللَّهِ أَخْبَرَنَا وَقَالَ الآخَرَانِ، حَدَّثَنَا حَبَّانُ بْنُ هِلاَلٍ، حَدَّثَنَا هَمَّامٌ، حَدَّثَنَا ثَابِتٌ، حَدَّثَنَا أَنَسُ بْنُ مَالِكٍ، أَنَّ أَبَا بَكْرٍ الصِّدِّيقَ، حَدَّثَهُ قَالَ نَظَرْتُ إِلَى أَقْدَامِ الْمُشْرِكِينَ عَلَى رُءُوسِنَا وَنَحْنُ فِي الْغَارِ فَقُلْتُ يَا رَسُولَ اللَّهِ لَوْ أَنَّ أَحَدَهُمْ نَظَرَ إِلَى قَدَمَيْهِ أَبْصَرَنَا تَحْتَ قَدَمَيْهِ فَقَالَ ‏
"‏ يَا أَبَا بَكْرٍ مَا ظَنُّكَ بِاثْنَيْنِ اللَّهُ ثَالِثُهُمَا ‏"‏ ‏.‏
Reference : Sahih Muslim 6169In-book reference : Book 44, Hadith 1