The Messenger of Allah ﷺ said, "Help your brother, whether he is the wrongdoer or the wronged."Someone asked, "Messenger of Allah, this is helping him when he is wronged, but how do we help him when he is the wrongdoer?"He replied, "You restrain him from wrongdoing. That is how you help him."
قال رسول الله ﷺ: انصر أخاك ظالما أو مظلوما. قيل: يا رسول الله، هذا نصره مظلوما، فكيف نصره ظالما؟ قال: تمسكه من الظلم فذاك نصرك إياه.
Ibn Hibban narrated it in his Sahih (5166) from Hasan bin Sufyan, who said, Mahfuz bin Abu Tuba told us, Ali bin Ayyash told us, Abu Ishaq Fazari told us, from Asim bin Muhammad bin Zayd Umari, from his father, who said, I heard Ibn Umar, and he related it.Its isnad is hasan because of Mahfuz bin Abu Tuba, who is Mahfuz bin Fadl bin Abu Tuba. A group of narrators transmitted from him, and Ibn Hibban mentioned him among his trustworthy narrators (9/204) and included his hadith in his Sahih, though there is some minor criticism of him. For this reason Dhahabi said in al-Mizan (3/444), "He was not abandoned."I say, this hadith of his has a firmly established basis. If there is some discrepancy in his hadith, or some objectionable element in its text, then it should be weakened.