Anas bin Malik reported,

Abu Bakr reported that he said to the Prophet ﷺ while they were in the cave, "If any one of them were to look down at his feet, he would see us beneath them."The Prophet ﷺ replied, "Abu Bakr, what do you think of two whose third is Allah?"He said, this is a hasan sahih gharib hadith. It is known only through the narration of Hammam, who is alone in transmitting it. Hibban bin Hilal and several others have narrated this hadith from Hammam in similar wording.

Tirmidhi 3096

Sahih

حدثنا زياد بن أيوب البغدادي حدثنا عفان بن مسلم حدثنا همام حدثنا ثابت

عن أنس

أن أبا بكر حدثه قال قلت للنبي ﷺ ونحن في الغار لو أن أحدهم ينظر إلى قدميه لأبصرنا تحت قدميه فقال يا أبا بكر ما ظنك باثنين الله ثالثهما قال هذا حديث حسن صحيح غريب إنما يعرف من حديث همام تفرد به وقد روى هذا الحديث حبان بن هلال وغير واحد عن همام نحو هذا

الترمذي 3096صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Tawbah
Numbering
Darussalam 3096
Tirmidhi 3096