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."
Sahih al-Bukhari Book 89, Hadith 13