وَلَقَدْ صَدَقَكُمُ اللَّهُ وَعْدَهُ إِذْ تَحُسُّونَهُم بِإِذْنِهِ ۖ حَتَّىٰ إِذَا فَشِلْتُمْ وَتَنَازَعْتُمْ فِي الْأَمْرِ وَعَصَيْتُم مِّن بَعْدِ مَا أَرَاكُم مَّا تُحِبُّونَ ۚ مِنكُم مَّن يُرِيدُ الدُّنْيَا وَمِنكُم مَّن يُرِيدُ الْآخِرَةَ ۚ ثُمَّ صَرَفَكُمْ عَنْهُمْ لِيَبْتَلِيَكُمْ ۖ وَلَقَدْ عَفَا عَنكُمْ ۗ وَاللَّهُ ذُو فَضْلٍ عَلَى الْمُؤْمِنِينَ ١٥٢
Walaqad sadaqakumu Allahu waAAdahu ith tahussoonahum biithnihi hatta itha fashiltum watanazaAAtum fee alamri waAAasaytum min baAAdi ma arakum ma tuhibboona minkum man yureedu alddunya waminkum man yureedu alakhirata thumma sarafakum AAanhum liyabtaliyakum walaqad AAafa AAankum waAllahu thoo fadlin AAala almumineena
Surely, Allah fulfilled His promise to you when you were killing them by His command until you showed cowardice and you started disputing about the command (of the Messenger [blessings and peace be upon him]) and later disobeyed (him), whereas Allah had brought that victory in your sight which you coveted. Amongst you were some who desired the gains of this world, and some others who sought reward in the Hereafter. Then He turned you back from them (dominated) so that He tests you. (Later, however,) He pardoned you and Allah is Most Gracious to the believers. (3:152)