Sahih Muslim 4410: The Merits of the Companions
Hazrat Salamah bin Akwa' (ra) relates that on the occasion of Khaibar Hazrat Ali (ra) had stayed behind the Prophet (saw), and he had trouble with his eyes. Then Hazrat Ali (ra) said: “Shall I stay behind the Messenger of Allah (saw)!” So Hazrat Ali (ra) set out and joined the Prophet (saw). Then, when the evening came of the night on whose morning Allah granted victory, the Messenger of Allah (saw) said: “I will give the flag,” or he said: “Tomorrow the flag will be taken by a man whom Allah and His Messenger love,” or he said: “who loves Allah and His Messenger. Allah will grant victory through him.” And then we saw that it was Hazrat Ali (ra), though we had not expected it of him. The people said: “This is Ali.” So the Messenger of Allah (saw) gave him the flag, and Allah granted victory through him.
AI-translated by Islam-Today