وَإِذْ يُرِيكُمُوهُمْ إِذِ ٱلْتَقَيْتُمْ فِىٓ أَعْيُنِكُمْ قَلِيلًۭا وَيُقَلِّلُكُمْ فِىٓ أَعْيُنِهِمْ لِيَقْضِىَ ٱللَّهُ أَمْرًۭا كَانَ مَفْعُولًۭا ۗ وَإِلَى ٱللَّهِ تُرْجَعُ ٱلْأُمُورُ
“[Remember, O Prophet,] when Allah showed them in your dream as few in number. Had He shown them to you as many, you [believers] would have certainly faltered and disputed in the matter. But Allah spared you [from that]. Surely, He knows best what is [hidden] in the heart. Then when your armies met, Allah made them appear as few in your eyes, and made you appear as few in theirs, so Allah may establish what He had destined. And to Allah [all] matters will be returned [for judgment].”
Surah al-Anfal was revealed on the plains of Badr regarding the battle and its aftermath.