Quran 8:43 — The Spoils of War (Al-Anfal)
GOD made them appear in your dream (O Muhammad) fewer in number. Had He made them appear more numerous, you would have failed, and you would have disputed among yourselves. But GOD saved the situation. He is Knower of the innermost thoughts.
[8:42] Recall that you were on this side of the valley, while they were on the other side. Then their caravan had to move to lower ground. Had you planned it this way, you could not have done it. But GOD was to carry out a predetermined matter, whereby those destined to be annihilated were annihilated for an obvious reason, and those destined to be saved were saved for an obvious reason. GOD is Hearer, Omniscient.
[8:44] And when the time came and you faced them, He made them appear fewer in your eyes, and made you appear fewer in their eyes as well. For GOD willed to carry out a certain plan. All decisions are made by GOD.