Musnad Ahmad 573
It was narrated that ‘Ali (رضي الله عنه) said:
The Messenger of Allah (ﷺ) sent me to Yemen, and we came to some people who had built a trap for a lion. They began to push one another, and one man fell, so he grabbed onto another one, who then grabbed onto another one, until all four of them ended up in the trap and the lion wounded them. Then a man came and killed the lion with a spear, and they all died of their wounds, The next of kin of the first man went to the next of kin of the last man, and they took out weapons to fight, then `Ali came to them straight away and said: Do you want to fight one another when the Messenger of Allah (ﷺ) is still alive? I will judge between you, and if you agree then that is the verdict, otherwise keep away from one another until you go to the Prophet (ﷺ) and he will be the one who judges between you, then whoever transgresses after that will have no right. Collect from the tribes of those who fell into the hole one quarter of the diyah [blood money], one third of the diyah, one half of the diyah and a complete diyah. For the first man (who fell in) there will be one quarter, because he caused the death of the one who came after him; for the second one there is one third of the diyah; and for the third one there is half of the diyah. They refused to accept that, so they went to the Prophet (ﷺ) when he was at Maqam Ibraheem and told him the story, and he said: “I will judge between you.” One of the people said: `Ali has already passed judgement. They told him about it and the Messenger of Allah (ﷺ) approved it.

It was narrated from Hanash that `Ali (رضي الله عنه) said: The fourth one gets the diyah (blood money] in full.
حَدَّثَنَا أَبُو سَعِيدٍ، حَدَّثَنَا إِسْرَائِيلُ، حَدَّثَنَا سِمَاكٌ، عَنْ حَنَشٍ، عَنْ عَلِيٍّ، رَضِيَ اللَّهُ عَنْهُ قَالَ بَعَثَنِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِلَى الْيَمَنِ فَانْتَهَيْنَا إِلَى قَوْمٍ قَدْ بَنَوْا زُبْيَةً لِلْأَسَدِ فَبَيْنَا هُمْ كَذَلِكَ يَتَدَافَعُونَ إِذْ سَقَطَ رَجُلٌ فَتَعَلَّقَ بِآخَرَ ثُمَّ تَعَلَّقَ رَجُلٌ بِآخَرَ حَتَّى صَارُوا فِيهَا أَرْبَعَةً فَجَرَحَهُمْ الْأَسَدُ فَانْتَدَبَ لَهُ رَجُلٌ بِحَرْبَةٍ فَقَتَلَهُ وَمَاتُوا مِنْ جِرَاحَتِهِمْ كُلُّهُمْ فَقَامُوا أَوْلِيَاءُ الْأَوَّلِ إِلَى أَوْلِيَاءِ الْآخِرِ فَأَخْرَجُوا السِّلَاحَ لِيَقْتَتِلُوا فَأَتَاهُمْ عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ عَلَى تَفِيئَةِ ذَلِكَ فَقَالَ تُرِيدُونَ أَنْ تَقَاتَلُوا وَرَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ حَيٌّ إِنِّي أَقْضِي بَيْنَكُمْ قَضَاءً إِنْ رَضِيتُمْ فَهُوَ الْقَضَاءُ وَإِلَّا حَجَزَ بَعْضُكُمْ عَنْ بَعْضٍ حَتَّى تَأْتُوا النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَيَكُونَ هُوَ الَّذِي يَقْضِي بَيْنَكُمْ فَمَنْ عَدَا بَعْدَ ذَلِكَ فَلَا حَقَّ لَهُ اجْمَعُوا مِنْ قَبَائِلِ الَّذِينَ حَفَرُوا الْبِئْرَ رُبُعَ الدِّيَةِ وَثُلُثَ الدِّيَةِ وَنِصْفَ الدِّيَةِ وَالدِّيَةَ كَامِلَةً فَلِلْأَوَّلِ الرُّبُعُ لِأَنَّهُ هَلَكَ مَنْ فَوْقَهُ وَلِلثَّانِي ثُلُثُ الدِّيَةِ وَلِلثَّالِثِ نِصْفُ الدِّيَةِ فَأَبَوْا أَنْ يَرْضَوْا فَأَتَوْا النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَهُوَ عِنْدَ مَقَامِ إِبْرَاهِيمَ فَقَصُّوا عَلَيْهِ الْقِصَّةَ فَقَالَ أَنَا أَقْضِي بَيْنَكُمْ وَاحْتَبَى فَقَالَ رَجُلٌ مِنْ الْقَوْمِ إِنَّ عَلِيًّا قَضَى فِينَا فَقَصُّوا عَلَيْهِ الْقِصَّةَ فَأَجَازَهُ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ حَدَّثَنَا بَهْزٌ حَدَّثَنَا حَمَّادٌ أَنْبَأَنَا سِمَاكٌ عَنْ حَنَشٍ أَنَّ عَلِيًّا رَضِيَ اللَّهُ عَنْهُ قَالَ وَلِلرَّابِعِ الدِّيَةُ كَامِلَةً‏.‏