Ghassān ibn Bishr al-Kāhilī narrated to us, from Muslim, from Khaythamah, from Saʿd: the Messenger of Allah ﷺ closed the doors of the people that opened into the mosque and left the door of ʿAlī open. The people spoke about this, so he said: “It was not I who opened it; rather, Allah opened it.”
This in no way conflicts with what is authentically recorded in Ṣaḥīḥ al-Bukhārī (1)—that during his final illness he ﷺ ordered all the doors leading into the mosque to be closed except the door of Abū Bakr al-Ṣiddīq. The earlier ruling concerning ʿAlī applied while the Prophet was still alive, because Fāṭimah needed to pass from her house to her father’s house; the concession was therefore granted as a kindness to her. After the Prophet’s death that reason no longer existed, and it then became necessary for the door of al-Ṣiddīq to remain open so that he could go out to the mosque and lead the people in prayer, since he was the caliph over them after the Prophet’s passing—may Allah have mercy on them all. In this there is also an implicit indication of his caliphate.
Al-Tirmidhī (2) said: ʿAlī ibn al-Mundhir narrated to us; Ibn Fuḍayl narrated to us, from Sālim ibn Abī Ḥafṣah, from ʿAṭiyyah, from Abū Saʿīd, who said: The Messenger of Allah ﷺ said to ʿAlī:
“O ʿAlī, it is not permissible for anyone who is junub (in a state of major ritual impurity) to remain in the mosque except me and you.”
ʿAlī ibn al-Mundhir said: I asked Ḍirār ibn Ṣurrad, “What does this ḥadīth mean?” He replied, “It is not lawful for anyone to pass through it while junub except me and you.” Al-Tirmidhī then commented, “This ḥadīth is ḥasan gharīb (sound yet singular in chain); we do not know it except through this route. Muḥammad ibn Ismāʿīl also heard this report and regarded it as unusual (3).”
Ibn ʿAsākir (4) transmitted it as well through the route of Kathīr al-Nawwāʾ, from ʿAṭiyyah, from Abū Saʿīd; he then cited it through another chain from Abū Nuʿaym: ʿAbd al-Malik ibn Abī Ghuniyah narrated to us, from Abū al-Khaṭṭāb ʿUmar al-Hijrī, from Maḥdūj, from Jasrah bint Dajājah, who said: Umm Salamah informed me that the Prophet ﷺ came out during his terminal illness until he reached the courtyard of the mosque and, raising his voice to its highest pitch, proclaimed: “It is not lawful for anyone who is junub or menstruating to enter the mosque except Muhammad and his wives, ʿAlī, and Fāṭimah the daughter of Muhammad. Have I conveyed the message to you? Woe unto you lest you go astray.” This chain is unusual and contains weakness. Ibn ʿAsākir then related it through the narration of Abū Rāfiʿ with similar wording, and that chain too is strange.
[Another ḥadīth]
Al-Ḥākim (5) and others narrated—through Saʿīd ibn Jubayr, from Ibn ʿAbbās, from Buraydah ibn al-Ḥuṣayb—who said: “I campaigned with ʿAlī to Yemen and witnessed from him a certain severity. When I returned to the Messenger of Allah ﷺ I mentioned ʿAlī and spoke ill of him; I then saw the face…"