—namely, the Prophet’s statement, “Islam is built upon….” A detailed discussion of it has already been presented, so there is no need to repeat it here.
As for the ḥadīth of Ṭalḥah ibn ʿUbayd Allāh about the man from Najd who arrived with dishevelled hair—those present could hear the murmur of his voice but could not make out what he was saying—he asked the Prophet ﷺ about Islam, whereupon the Prophet enumerated for him the five daily prayers, the fast of Ramaḍān, and zakah. He did not mention the testimony that there is no god but Allah and that Muhammad is the Messenger of Allah, because the Prophet ﷺ knew the man had already uttered and affirmed it; he had come as a Muslim and merely wished to ask about the details of certain matters.
In that narration the Prophet ﷺ said to him, after mentioning the five prayers, the fast of Ramaḍān, and zakah, and when the man asked, “Am I obliged to do anything besides these?”—“No, unless you volunteer extra.”
This shows that no more than five prayers within each day and night are obligatory. Accordingly, the witr prayer is not obligatory but is an emphatically recommended sunnah; likewise, taḥiyyat al-masjid (the mosque greeting prayer) is not obligatory but emphatically recommended, and the two ʿEid prayers are also not obligatory but emphatically recommended, as are other matters over which the scholars have differed.
Some scholars adopted this position and treated this ḥadīth as the basis for the non-obligation of the practices just mentioned. Yet on closer examination the ḥadīth provides no proof for that: it does not negate the obligation of taḥiyyat al-masjid or of the ʿEid prayer and the like, for these prayers are occasion-specific and become obligatory when their particular causes arise. The stronger view, however, is that taḥiyyat al-masjid is not compulsory, though it remains an emphatically recommended sunnah, whereas the ʿEid prayer is obligatory, because the Prophet ﷺ instructed even menstruating women, those who normally remain in seclusion, and adolescent girls to go out and pray—while the menstruating women were to keep away from the actual prayer area. As for witr—