(7) باب يَمِينِ الرَّجُلِ لِصَاحِبِهِ إِنَّهُ أَخُوهُ، إِذَا خَافَ عَلَيْهِ الْقَتْلَ أَوْ نَحْوَهُ
Narrated Anas:
Allah's Messenger (ﷺ) said, "Help your brother whether he is an oppressor or an oppressed," A man said, "O Allah's Messenger (ﷺ)! I will help him if he is oppressed, but if he is an oppressor, how shall I help him?" The Prophet (ﷺ) said, "By preventing him from oppressing (others), for that is how to help him."
Reference: Sahih al-Bukhari 6952
In-book reference: Book 89, Hadith 13
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 9, Book 85, Hadith 84