Sahih al-Bukhari, Volume 5, Book 58, Hadith 259 (USC-MSA)

Narrated Abu Bakr: I was with the Prophet in the Cave. When I raised my head, I saw the feet of the people. I said, "O Allah's Messenger! If some of them should look down, they will see us." The Prophet said, "O Abu Bakr, be quiet! (For we are) two and Allah is the Third of us."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا هَمَّامٌ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، عَنْ أَبِي بَكْرٍ ـ رضى الله عنه ـ قَالَ كُنْتُ مَعَ النَّبِيِّ صلى الله عليه وسلم فِي الْغَارِ فَرَفَعْتُ رَأْسِي، فَإِذَا أَنَا بِأَقْدَامِ الْقَوْمِ، فَقُلْتُ يَا نَبِيَّ اللَّهِ، لَوْ أَنَّ بَعْضَهُمْ طَأْطَأَ بَصَرَهُ رَآنَا‏.‏ قَالَ ‏ "‏ اسْكُتْ يَا أَبَا بَكْرٍ، اثْنَانِ اللَّهُ ثَالِثُهُمَا ‏" ‏‏.‏

sunnah.com