Al-Hafiz Abu al-Fath Muhammad b. `Ali al-Natanzi related in "al-Khasa'is al-`Alawiyyah" from al-Hasan b. Ahmad al-Muhri [al-Muqri] from Ahmad b. `Abdallah b. Ahmad who said: Muhammad b. Ahmad b. `Ali narrated to us, he said: Muhammad b. `Uthman b. Abi Shaybah narrated to us, he said: Yahya al-Himmani narrated to us, he said: Qays b. al-Rabi` narrated to us from Abi Harun al-`Abdi from Abi Sa`id al-Khudri who said:
The Messenger of Allah, blessings and salutations of Allah on him, summoned the people to `Ali, may Allah be pleased with him, in Ghadir Khumm. He gave instructions about the thorns under the tree and they were swept up. That was a Thursday. He called `Ali and took him by his upper arms and raised them up until the people saw the whiteness of the armpits of the Messenger of Allah. They did not disperse until this verse was revealed: ‘Today I have perfected for you your religion...’ (5:3).
The Messenger of Allah, blessings and salutations of Allah on him, said: "Allah is most Great at the perfection of religion and the completion of blessings, and the Lord’s acceptance of my mission and the mastership (wilaya) of `Ali, peace be upon him, after me."
Then he said: "Of whomsoever I am master (mawla), `Ali is his master. O Allah, befriend one who befriends him and be at enmity with one who is hostile to him; help the one who helps him and forsake the one who forsakes him."
Hassan said: "Permit me, O Messenger of Allah, to recite some verses on `Ali for you to hear." He said: "Recite, with the blessing of Allah."
So Hassan rose and said: "O elders of Quraysh, listen to my profession of the testimony of the Messenger of Allah, blessings and salutations of Allah on him, concerning the confirmed Wilaya:
On the day of al-Ghadir their Prophet calls to them at Khumm, so listen to the Messenger calling;
He says: Who is your master and your guardian? They said, without displaying blindness there:
Your God is our Master and you are our guardian, and you will not find among us anyone disobedient concerning the Wilaya.
He said to him: Rise, O `Ali, for I approve of you as Imam and guide after me."
This hadith has many chains of transmission leading up to Abu Sa`id al-Khudri.