Quran 3:151. We will throw terror into the hearts of those who disbelieve, because they attribute to God partners for which He revealed no sanction. Their lodging is the Fire. Miserable is the lodging of the evildoers.
152. God has fulfilled His promise to you, and you defeated them by His leave; until when you faltered, and disputed the command, and disobeyed after He had shown you what you like. Some of you want this world, and some of you want the next. Then He turned you away from them, to test you; but He pardoned you. God is Gracious towards the believers.
153. Remember when you fled, not caring for anyone, even though the Messenger was calling you from your rear. Then He repaid you with sorrow upon sorrow, so that you would not grieve over what you missed, or for what afflicted you. God is Informed of what you do.
154. Then after the setback, He sent down security upon you. Slumber overcame some of you, while others cared only for themselves, thinking of God thoughts that were untrue—thoughts of ignorance—saying, “Is anything up to us?” Say, “Everything is up to God.” They conceal within themselves what they do not reveal to you. And they say, “If it was up to us, none of us would have been killed here.” Say, “Even if you Had stayed in your homes, those destined to be killed would have marched into their death beds.” God thus tests what is in your minds, and purifies what is in your hearts. God knows what the hearts contain.
155. Those of you who turned back on the day when the two armies clashed—it was Satan who caused them to backslide, on account of some of what they have earned. But God has forgiven them. God is Forgiving and Prudent.
156. O you who believe! Do not be like those who disbelieved, and said of their brethren who marched in the land, or went on the offensive, “Had they stayed with us, they would not have died or been killed.” So that God may make it a cause of regret in their hearts. God gives life and causes death. God is Seeing of what you do.
157. If you are killed in the cause of God, or die—forgiveness and mercy from God are better than what they hoard.
158. If you die, or are killed—to God you will be gathered up.
159. It is by of grace from God that you were gentle with them. Had you been harsh, hardhearted, they would have dispersed from around you. So pardon them, and ask forgiveness for them, and consult them in the conduct of affairs. And when you make a decision, put your trust in God; God loves the trusting.
160. If God supports you, there is none who can overcome you. But if He fails you, who is there to help you after Him? So in God let the believers put their trust.
The commentary will let me copy and paste again this morning.
It is remarkable that the Holy Qur’ån calls attention to the Prophet’s gentle dealing with those around him when speaking of his experience in the field of battle as a general, leading his men against overwhelming forces, a capacity which required him to be very strict in punishing any delinquency. But he was not a mere general. His ability in leading his men, in occupying positions of advantage in the field of battle, and in directing a handful of men to face three, four, and sometimes ten times their own number, marks him out as the ablest general the world has ever seen, yet his gentle manners and his practical forbearance in dealing with his friends as well as foes stand in remarkable contrast with his capacity as a commander in the field of battle. It is related that after the U√ud trouble the Prophet did not speak even a harsh word to those who were guilty of disobeying his orders (Rz).
The Prophet had gone out to meet the enemy as the result of a consultation and against his own inclination, for he sided with the minority in the opinion that they should not meet the enemy in the open field. Apparently that council had brought about the present trouble, yet so firm was he in adhering to sound principles that at such a critical time he did not waver for a minute from the course of taking counsel in important matters, and just at this juncture we find Divine revelation clearly laying down the principle of adhering to counsel.
The saying that comes to mind is "speak softly and carry a big stick". Apparently while Muhammed was speaking softly.... God was his Big Stick.
According to the story here..... the soldiers were debating whether to fight a battle in the open field or in the city where they could rout out the non-Muslims and take the booty. When the soldiers started thinking about what they can take..... that's when they stopped fighting for God.
Back in the beginning.... it said Muslims were only to fight to defend the mosque and themselves. As soon as the battle was over they were to put down their weapons and go back to normal life. Here some of those Muslims have decided that fighting might become profitable. Also.... they wanted to bring the battle right into town where they could gather their booty where it resided. This was not what they had been taught.... and they didn't do so well.
After the battle.... if they won.... they would get a big head and think they were the ones who brought on their victory. When the battle was going against them.... they blamed it on God.
We do the same thing..... we take all the credit for all the good stuff.... and blame God when we get bad stuff.