Sayyiduna Imran bin Husayn (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) sent out an expedition and appointed Ali (may Allah be pleased with him) as its commander, and he set out with the expedition. During it, Ali (may Allah be pleased with him) took a slave girl, and the people objected to this. So four of the Companions of the Messenger of Allah (peace and blessings be upon him) made a pact among themselves and said: When we meet the Messenger of Allah (peace and blessings be upon him), we will tell him what Ali did. Imran (may Allah be pleased with him) said: It was the practice of the Muslims that when they returned from a journey, they would first go to the Messenger of Allah (peace and blessings be upon him), greet him with salam, and then leave. So when this expedition returned, they greeted the Messenger of Allah (peace and blessings be upon him) with salam, and one of the four stood up and said: "O Messenger of Allah, do you not see that Ali did such-and-such?" He (peace and blessings be upon him) turned away from him. Then the second stood up and said: "O Messenger of Allah, do you not see that Ali did such-and-such?" He (peace and blessings be upon him) turned away from him as well. Then the third of them stood up and said: "O Messenger of Allah, do you not see that Ali did such-and-such?" He (peace and blessings be upon him) turned away from him as well. Then the fourth stood up and said: "O Messenger of Allah, do you not see that Ali did such-and-such?" So the Messenger of Allah (peace and blessings be upon him) turned towards him, with anger plainly visible on his (peace and blessings be upon him) face, and said: "What do you want from Ali?" (he said it three times) "Indeed, Ali is from me and I am from him, and he is the wali (ally and protector) of every believer after me."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15356