It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Help your brother, whether he is a wrongdoer or wronged." The noble Companions (may Allah be pleased with them) said: O Messenger of Allah (peace and blessings be upon him), helping him when he is wronged (we understand), but how shall we help him when he is a wrongdoer?! He (peace and blessings be upon him) said: "Stop him from doing wrong (that is helping him)."
Imam al-Harith recorded it with a sahih (authentic) chain, and it also has a supporting narration (shahid) from the hadith of Sayyiduna Abdullah bin Umar (may Allah be pleased with them both), which Imam Ibn Hibban reported in his Sahih.