Sunan an-Nasa'i, Book 45, Hadith 28 (In-Book)

It was narrated from Dawud hin Al-Husain, from 'Ikrimah, from Ibn 'Abbas, that the Verses in AL-Ma'idah, in which Allah, the Mighty and Sublime, says: "Either judge between them, or turn away from them. If you turn away from then up to: those who act justly."[1] - were revealed concerning the matter of blood money between An-Nadir and Quraizah. That was because the slain of An-Nadir were of noble status, so the blood money would be paid in full for them, but for Banu Quraizah only half of the blood money would be paid. They referred the matter to the Messenger of Allah for judgment, then Allah, the Mighty and Sublime, revealed that concerning them, so the Messenger of Allah told them to do the right thing and he made the blood money equal.

أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ سَعْدٍ، قَالَ حَدَّثَنَا عَمِّي، قَالَ حَدَّثَنَا أَبِي، عَنِ ابْنِ إِسْحَاقَ، أَخْبَرَنِي دَاوُدُ بْنُ الْحُصَيْنِ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ الآيَاتِ الَّتِي، فِي الْمَائِدَةِ الَّتِي قَالَهَا اللَّهُ عَزَّ وَجَلَّ ‏{‏ فَاحْكُمْ بَيْنَهُمْ أَوْ أَعْرِضْ عَنْهُمْ ‏}‏ إِلَى ‏{‏ الْمُقْسِطِينَ ‏}‏ إِنَّمَا نَزَلَتْ فِي الدِّيَةِ بَيْنَ النَّضِيرِ وَبَيْنَ قُرَيْظَةَ وَذَلِكَ أَنَّ قَتْلَى النَّضِيرِ كَانَ لَهُمْ شَرَفٌ يُودَوْنَ الدِّيَةَ كَامِلَةً وَأَنَّ بَنِي قُرَيْظَةَ كَانُوا يُودَوْنَ نِصْفَ الدِّيَةِ فَتَحَاكَمُوا فِي ذَلِكَ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ ذَلِكَ فِيهِمْ فَحَمَلَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى الْحَقِّ فِي ذَلِكَ فَجَعَلَ الدِّيَةَ سَوَاءً ‏.‏

sunnah.com