Sunan Abi Dawud, Hadith 2731

Narrated Abdullah ibn Abbas: The Messenger of Allah said on the day of Badr: He who does such-and-such, will have such-and such. The young men came forward and the old men remained standing near the banners, and they did not move from there. When Allah bestowed victory on them, the old men said: We were support for you. If you had been defeated, you would have returned to us. Do not take this booty alone and we remain (deprived of it). The young men refused (to give), and said: The Messenger of Allah has given it to us. Then Allah sent down: "They ask thee concerning (things taken as) spoils of war, Say: (Such) spoils are at the disposal of Allah and the Apostle......Just as they Lord ordered thee out of thy house in truth, even though a party among the believers disliked it." This proved good for them. Similarly obey me. I know the consequence of this better than you.

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

sunnah.com