(19) بَابُ مَا كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُعْطِي الْمُؤَلَّفَةَ قُلُوبُهُمْ وَغَيْرَهُمْ مِنَ الْخُمُسِ وَنَحْوِهِ
Narrated `Abdullah:
On the day (of the battle) of Hunain, Allah's Messenger (ﷺ) favored some people in the distribution of the booty (to the exclusion of others); he gave Al-Aqra' bin H`Abis one-hundred camels and he gave 'Uyaina the same amount, and also gave to some of the eminent Arabs, giving them preference in this regard. Then a person came and said, "By Allah, in this distribution justice has not been observed, nor has Allah's Pleasure been aimed at." I said (to him), "By Allah, I will inform the Prophet (of what you have said), "I went and informed him, and he said, "If Allah and His Apostle did not act justly, who else would act justly. May Allah be merciful to Moses, for he was harmed with more than this, yet he kept patient."
Reference: Sahih al-Bukhari 3150
In-book reference: Book 57, Hadith 58
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 4, Book 53, Hadith 378