It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Three people from among the past nations set out in search of provision for their families. They were caught by the rain and took shelter in a cave. Then a leaning rock fell upon them (and blocked the mouth of the cave), until they could not see any opening in it." And he mentioned the complete hadith in the same way.
Abdullah bin Ahmad (may Allah have mercy on him) said: Abu Bahr (may Allah have mercy on him) narrated to us, from Abu Awanah (may Allah have mercy on him), from Qatadah (may Allah have mercy on him), from Sayyiduna Anas (may Allah be pleased with him), from the Prophet (peace and blessings be upon him), a narration like it.
Imam Ahmad (may Allah have mercy on him) narrated it from Bahz (may Allah have mercy on him), from Abu Awanah (may Allah have mercy on him), from Qatadah (may Allah have mercy on him), from Sayyiduna Anas (may Allah be pleased with him): that there were three people, but he did not narrate it as marfu' (attributed to the Prophet (peace and blessings be upon him)).
Abd al-Rahman bin Abi Hatim (may Allah have mercy on him) said: I asked my father (Imam Abu Hatim, may Allah have mercy on him) about a hadith that Imran al-Qattan (may Allah have mercy on him) narrated from Qatadah (may Allah have mercy on him), from Sa'id bin Abi al-Hasan (may Allah have mercy on him), from Sayyiduna Abu Hurayrah (may Allah be pleased with him), from the Prophet (peace and blessings be upon him), about the story of the cave; whereas Abu Awanah (may Allah have mercy on him) narrated it from Qatadah (may Allah have mercy on him), from Sayyiduna Anas (may Allah be pleased with him), from the Prophet (peace and blessings be upon him), as marfu'. I asked my father: "Which of them is correct?" He said: "In my view both hadiths are correct, because their wordings are different."
My father said: Musaddad (may Allah have mercy on him) narrated to us, from Abu Awanah (may Allah have mercy on him), from Qatadah (may Allah have mercy on him), from Sayyiduna Anas (may Allah be pleased with him), from the Prophet (peace and blessings be upon him), about the story of the cave.
And there is a supporting narration (shahid) for this in the Sahih from the hadith of Sayyiduna Abdullah bin Umar (may Allah be pleased with them both).