We were with the Messenger of Allah ﷺ on a journey when we stopped at Ghadir Khumm. The call went out among us, "The prayer is gathering." A spot was cleared for the Messenger of Allah ﷺ beneath two trees, and he prayed the noon prayer. Then he took Ali's hand and said, "Do you not know that I have a greater claim over the believers than they have over themselves?"They replied, "Yes indeed."He said, "Do you not know that I have a greater claim over every believer than he has over himself?"They replied, "Yes indeed."Then he took Ali's hand and said, "Whoever I am his master, Ali is his master. Allah, befriend whoever befriends him and oppose whoever opposes him."The narrator said, Umar met him afterward and said, "Congratulations, son of Abu Talib. You have become, morning and evening, the master of every believing man and woman."
حدثنا عفان حدثنا حماد بن سلمة أخبرنا علي بن زيد عن عدي بن ثابت
كنا مع رسول الله ﷺ في سفر فنزلنا بغدير خم فنودي فينا الصلاة جامعة وكسح لرسول الله ﷺ تحت شجرتين فصلى الظهر وأخذ بيد علي رضي الله تعالى عنه فقال ألستم تعلمون أني أولى بالمؤمنين من أنفسهم قالوا بلى قال ألستم تعلمون أني أولى بكل مؤمن من نفسه قالوا بلى قال فأخذ بيد علي فقال من كنت مولاه فعلي مولاه اللهم وال من والاه وعاد من عاداه قال فلقيه عمر بعد ذلك فقال هنيئا يا ابن أبي طالب أصبحت وأمسيت مولى كل مؤمن ومؤمنة
Its isnad is hasan because of Ali bin Zayd. The hadith was narrated by Ibn Majah, 1/43, no. 116, and similarly by Tirmidhi, 5/633, no. 3/37, in the chapters on virtues, the virtues of Ali bin Abu Talib, and he said, hasan sahih. And Ibn Hibban, 2202, Mawarid.18391m [Abu Abdul-Rahman said], Hudba bin Khalid narrated to us, Hammad bin Salama narrated to us, from Ali bin Zayd, from Adi bin Thabit, from Bara bin Azib, from the Prophet ﷺ... similarly.Sahih (18391m). Its isnad is sahih, and it is among the additions.