The ḥadith was also recorded by Ibn Khuzaymah and by Ibn Ḥibbān in their respective Ṣaḥīḥ collections—as cited in al-Jalāʾ (p. 262) and in Ibn Kathīr’s Tafsīr (3/294). In Tuḥfat al-Dhākirīn (p. 94) al-Shawkānī attributes it to Muslim, which is an error on his part—or perhaps merely a slip of the pen. In al-Zawāʾid he comments: “Its chain is sound; its transmitters are trustworthy.”
Fourth supporting route: On the authority of Abū Ḥumayd—or Abū Usayd—the Prophet ﷺ said:
“When one of you enters the mosque, let him say: ‘O Allah, open for me the gates of Your mercy.’ When he leaves, let him say: ‘O Allah, I ask You of Your bounty.’”
Muslim (2/155), al-Dārimī (2/293), and al-Bayhaqī (2/441) all record it through several routes from Sulaymān ibn Bilāl, from Rabīʿah ibn Abī ʿAbd al-Raḥmān, from ʿAbd al-Malik ibn Saʿīd, from Abū Ḥumayd—or Abū Usayd.
ʿAbd al-ʿAzīz al-Darāwardī also followed Sulaymān in narrating it from Rabīʿah, likewise with the uncertainty regarding the Companion; this version appears in Abū Dāwūd (1/76), al-Dārimī (1/324), and al-Bayhaqī.
ʿImārah ibn Ghaziyyah likewise transmitted the tradition, and Muslim and al-Bayhaqī cite his narration through Bishr ibn al-Mufaḍḍal from him.
Ismāʿīl ibn ʿAyyāsh, however, diverged from ʿImārah ibn Ghaziyyah, narrating it solely from Abū Ḥumayd. Ibn Mājah (1/259) records this version, yet Ismāʿīl ibn ʿAyyāsh is weak in his transmissions from the scholars of the Ḥijāz, and this report is one such instance.
The ḥadith also appears via the first route in al-Nasāʾī (1/119) and Aḥmad (3/497; 5/425).