Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said on the day of Badr, "Whoever does such and such will receive such and such from the spoils."So the young men rushed forward, while the older men stayed by the banners and did not leave them. When Allah granted them victory, the older men said, "We were a support for you. Had you been routed, you would have fallen back to us. So do not take all the spoils for yourselves and leave us with nothing."But the young men refused, saying, "The Messenger of Allah ﷺ assigned them to us."So Allah revealed, "They ask you about the spoils of war. Say, 'The spoils of war belong to Allah and the Messenger,'" up to His words, "just as your Lord brought you out of your house in truth, while a group of the believers were averse to it" [Anfal 8:1–5].He is saying that this was better for them, and likewise in this matter, so obey me, for I know better than you the outcome of this.

Abu Dawud 2737

Sahih

حدثنا وهب بن بقية قال أخبرنا خالد عن داود عن عكرمة

عن ابن عباس قال

قال رسول الله ﷺ يوم بدر من فعل كذا وكذا فله من النفل كذا وكذا قال فتقدم الفتيان ولزم المشيخة الرايات فلم يبرحوها فلما فتح الله عليهم قال المشيخة كنا ردءا لكم لو انهزمتم لفئتم إلينا فلا تذهبوا بالمغنم ونبقى فأبى الفتيان وقالوا جعله رسول الله ﷺ لنا فأنزل الله {يسألونك عن الأنفال قل الأنفال لله والرسول} إلى قوله {كما أخرجك ربك من بيتك بالحق وإن فريقا من المؤمنين لكارهون} يقول فكان ذلك خيرا لهم فكذلك أيضا فأطيعوني فإني أعلم بعاقبة هذا منكم

أبو داود 2737صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Jihad
Chapter
Voluntary prayer
Numbering
Darussalam 2737
Abu Dawud 2737