Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: Two verses of Surah al-Ma'idah were abrogated: one is the verse of the Qala'id (garlanded sacrificial animals), and the other is "So judge between them or turn away from them" [Surah al-Ma'idah: 42], in which the Prophet (peace and blessings be upon him) had been given the choice: if he wished he would judge in it, and if he wished he would not, and would return them to their own rulers. After that this verse was revealed: "And judge between them by what Allah has revealed and do not follow their desires" [Surah al-Ma'idah: 49], so the Prophet (peace and blessings be upon him) was commanded to judge according to the Qur'an.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17125