حَدَّثَنَا مُحَمَّدُ بْنُ ثَعْلَبَةَ بْنِ سَوَاءٍ، حَدَّثَنِي عَمِّي، مُحَمَّدُ بْنُ سَوَاءٍ عَنْ حُسَيْنٍ الْمُعَلِّمِ، عَنْ مَطَرٍ الْوَرَّاقِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم مَنْ أَعَانَ عَلَى خُصُومَةٍ بِظُلْمٍ - أَوْ يُعِينُ عَلَى ظُلْمٍ - لَمْ يَزَلْ فِي سَخَطِ اللَّهِ حَتَّى يَنْزِعَ "
It was narrated from Ibn 'Umar that the Messenger of Allah (ﷺ) said:
"Whoever takes the wrongdoer's side in a dispute or supports wrongdoing, he will remain subject to the wrath of Allah until he gives it up."
Reference: Sunan Ibn Majah 2320
In-book : Book 13, Hadith 13
English translation : Vol. 3, Book 13, Hadith 2320