It is narrated from Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) that he said: "On the day of Uhud, sixty-four men of the Ansar and six of the Muhajirun were martyred, and the Messenger of Allah (peace and blessings be upon him) said: "If we are granted such a day (of victory) over the polytheists, we will certainly exceed them in retaliation." Then when the day of the Conquest of Makkah came, an unknown man said: "After today there will be no Quraysh left," whereupon the herald of the Messenger of Allah (peace and blessings be upon him) called out: "Everyone, black and white (that is, everyone, high and low), is safe except so-and-so and so-and-so," meaning the few individuals whom he (peace and blessings be upon him) had named. On this occasion Allah Almighty revealed this verse: "And if you retaliate, then retaliate with the like of what was done to you; but if you are patient, that is certainly better for those who are patient," and the Messenger of Allah (peace and blessings be upon him) said: "We will be patient and will not retaliate."
Imam al-Tirmidhi (may Allah have mercy on him) narrated it from al-Husayn bin Hurayth (in agreement with this chain) and said: "This hadith is hasan gharib as a narration of Sayyiduna Ubayy (may Allah be pleased with him)."
Abdullah bin Ahmad (may Allah have mercy on him) also narrated it similarly through Sa'id bin Muhammad al-Jarmi, Abu Tumaylah and Isa bin Ubayd.
And Abu Hatim al-Busti (may Allah have mercy on him) narrated it like the narration of al-Husayn bin Hurayth through Abdullah bin Muhammad, Ishaq bin Ibrahim and al-Fadl bin Musa.
Related hadith on this topic