The Messenger of Allah ﷺ said, "The key to prayer is purification, its sanctification is the takbir, and its conclusion is the taslim."
قال رسول الله ﷺ: مفتاح الصلاة الطهور، وتحريمها التكبير، وتحليلها التسليم.
Abu Dawud (61), Tirmidhi (3), and Ibn Majah (275) all narrated it through the route of Sufyan, from Abdullah bin Muhammad bin Aqeel, from Muhammad bin Hanafiya, from Ali bin Abu Talib, and he mentioned it. I say, its isnad is hasan due to the discussion regarding Abdullah bin Muhammad bin Aqeel, except that his hadith is hasan. Nawawi said in Majmu (3/289), "Abu Dawud, Tirmidhi, and others narrated it with a sahih isnad." Hafiz said in Talkhis (1/216), "Hakim and Ibn Sakan graded it sahih."Tirmidhi said, "This hadith is the most sahih and the best thing on this subject, and Abdullah bin Muhammad bin Aqeel is truthful, though some scholars of knowledge have discussed him regarding his memory." He said, I heard Muhammad bin Ismail say, Ahmad bin Hanbal, Ishaq bin Ibrahim, and Humaydi used to rely on the hadith of Abdullah bin Muhammad bin Aqeel. Muhammad (meaning Bukhari) said, "His hadith is close to sound." End of quote. Muhammad bin Hanafiya is Muhammad bin Ali bin Abu Talib, attributed to his mother, Khawla bint Jafar the Hanafite, from Banu Hanifa.Then Tirmidhi said in the Book of Prayer, chapter on what has been said regarding the prohibition of prayer and its release (238), after narrating the hadith of Abu Saeed Khudri, "The hadith of Ali bin Abu Talib on this subject has a better and more sahih isnad than the hadith of Abu Saeed, and we have written it at the beginning of the Book of Wudu." And he said regarding the hadith of Abu Saeed, "A hasan hadith." This statement of Tirmidhi has been omitted from some manuscripts.The correct view is that the hadith of Abu Saeed is daif. Tirmidhi narrated it in the place mentioned above, and Ibn Majah (276) also narrated it, both through the route of Abu Sufyan Tarif bin Shihab, from Abu Nadra, from Abu Saeed, as a raised hadith, with the wording, "The key to prayer is purification, its prohibition is the takbir, and its release is the taslim." Tirmidhi added, "And there is no prayer for one who does not recite the Hamd and a surah, whether in an obligatory prayer or otherwise."Abu Sufyan Tarif bin Shihab Saadi is daif. Ibn Main and Abu Hatim both declared him daif. Bukhari said, "He is not strong." Abu Dawud said, "He is nothing." Nasai said, "His hadith is abandoned."As for what Hakim narrated (1/132) through the route of Saeed bin Masruq Thawri, from Abu Nadra, from Abu Saeed, with the same wording, saying, "Sahih isnad according to the criterion of Muslim," it appears that a printing error occurred, because he says right after it, "and its corroborating narrations from Abu Sufyan from Abu Nadra are numerous. Abu Hanifa, Hamza Zayyat, Abu Malik Nakhai and others have narrated it from Abu Sufyan," yet Abu Sufyan had not been mentioned at all beforehand. So the mention of Saeed bin Masruq Thawri is an error from the copyist or the printer, and it should actually be Abu Sufyan. As for Dhahabi also mentioning Saeed bin Masruq in his Talkhis, either he too fell into the same mistake because it existed in his copy of Hakim's work in that form, or the editors confirmed it to match what was in the original.Among those who narrated the hadith of Abu Saeed through the route of the aforementioned Abu Sufyan is Daraqutni (1/359), one of Hakim's teachers, except that he did not mention the intermediary between him and Abu Saeed, who is Abu Nadra. As for Zaylai, he disregarded mentioning Saeed bin Masruq or Abu Sufyan, and instead transmitted Hakim's statement, "The hadith of Abdullah bin Aqeel from Ibn Hanafiya from Ali has the more well known isnad, but the two sheikhs (Bukhari and Muslim) disregarded Ibn Aqeel altogether." This indicates that the route which Hakim narrated is the one containing Abu Sufyan, for had it been Saeed bin Masruq, he would have made him a corroborator for it and strengthened his standing. Praise be to Allah for His guidance.