The Cave of Thawr: “Allah Is the Third”

The men hunting them were close enough to see their feet. He said six words that have calmed believers ever since.

2 min read · Reviewed 19 October 2026 · Told only from authentic hadith, linked to sunnah.com

In short: During the migration to Madinah, the Prophet ﷺ and Abu Bakr hid in a cave. Abu Bakr said: if one of them looked down at his feet, he would see us. The Prophet ﷺ answered: what do you think of two, when Allah is their third? (Sahih al-Bukhari 3653).

The story

When the Prophet ﷺ left Makkah for Madinah, he travelled with Abu Bakr, and the two hid in a cave while the people of Quraysh searched for them. Abu Bakr himself narrated what happened: he said to the Prophet ﷺ that if any of them looked under his feet, he would see them.

The Prophet ﷺ replied: “O Abu Bakr, what do you think of two, the third of whom is Allah?” (Bukhari 3653).

Allah mentions this moment in the Quran: “…the second of two, when they were in the cave and he said to his companion: Do not grieve, indeed Allah is with us” (Quran 9:40).

The well-known details of a spider’s web and a nesting dove at the cave come through a report whose chain scholars dispute, so we have left them out. The authentic account is the one above.

📩 Free Ramadan 2027 checklist

Join the weekly AskUmmah email: a sourced dua, 5 quiz questions and the Islamic dates coming up. Confirm your email and get the printable checklist free.

No spam. Unsubscribe anytime. Privacy

What we can take from it

  • “Do not grieve, Allah is with us.” Worth saying to yourself when you feel cornered.
  • Trust in Allah came after taking every means: they planned the journey, hid and travelled carefully.
  • A true friend stays beside you in the cave.

We retell authentic texts with their sources and leave out details that are not in them. We do not issue rulings; for personal questions, please ask a qualified scholar. Spotted a mistake? Let us know.

💬 Get a daily dua on WhatsApp

More stories

All stories →

Frequently asked questions

What did the Prophet ﷺ say to Abu Bakr in the cave?

“What do you think of two, the third of whom is Allah?” (Sahih al-Bukhari 3653). The Quran records: “Do not grieve, indeed Allah is with us” (9:40).

Is the spider web story at the cave authentic?

It comes through a report in Musnad Ahmad whose chain scholars dispute. The authentic account of the cave is in Sahih al-Bukhari 3653.

Keep exploring