Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) narrates: On the day of Uhud, 64 of the Ansar and 6 of the Muhajirun were martyred, among them Sayyiduna Hamzah (may Allah be pleased with him), and the idolaters mutilated their dead. The Ansar said: "If one day we get the upper hand over them, we will certainly do worse to them than this." Then when the day of the Conquest of Makkah came, an unknown man called out, saying: "There is no Quraysh after today." And Allah, the Mighty and Majestic, revealed this verse to His Prophet (peace and blessings be upon him): "And if you retaliate, retaliate with the like of that with which you were harmed; but if you are patient, it is better for those who are patient" [Al-Nahl: 126]. So the Prophet of Allah (peace and blessings be upon him) said: "Hold back from the people (from retaliation)."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 2925