Ikrimah (may Allah have mercy on him) said: "So if they come to you, judge between them or turn away from them" [Surah al-Ma'idah: 42] — this verse was abrogated by this verse: "And judge between them by what Allah has revealed and do not follow their desires" [Surah al-Ma'idah: 49].
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17126