Bara bin Azib reported,

We came with the Messenger of Allah ﷺ on the pilgrimage he performed. At a point along the way he stopped, and the call went out for the congregational prayer. Then he took Ali رضي الله عنه by the hand and said, "Am I not closer to the believers than they are to themselves?"They replied, "Yes, indeed."He said, "Am I not closer to every believer than he is to himself?"They replied, "Yes, indeed."He said, "Then this man is the patron of whoever takes me as his patron. O Allah, befriend whoever befriends him, and oppose whoever opposes him."

Ibn Majah 116

Daif

حدثنا علي بن محمد حدثنا أبو الحسين أخبرني حماد بن سلمة عن علي بن زيد بن جدعان عن عدي بن ثابت

عن البراء بن عازب قال

أقبلنا مع رسول الله ﷺ في حجته التي حج فنزل في بعض الطريق فأمر الصلاة جامعة فأخذ بيد علي رضي الله عنه فقال ألست أولى بالمؤمنين من أنفسهم قالوا بلى قال ألست أولى بكل مؤمن من نفسه قالوا بلى قال فهذا ولي من أنا مولاه اللهم وال من والاه اللهم عاد من عاداه

ابن ماجه 116ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Sunnah
Chapter
Virtue of Ali bin Abu Talib رضي الله عنه
Numbering
Darussalam 116
Ibn Majah 116