Remember two of your parties Meditated cowardice; but Allah was their protector, and in Allah should the faithful (Ever) put their trust.
Allah had helped you at Badr, when ye were a contemptible little force; then fear Allah; thus May ye show your gratitude.
A mischief of the hypocrites
The two groups referred to in the above verse, according to some commentators, are the Banū Salamah of Khazraj and the Banū Ḥārithah of the Aws tribe. On account of the hypocrites’ machinations among them, they experienced cowardice and weakness for a time, but soon overcame these feelings. The hypocrites did not want to participate in this fight and the Prophet, peace be upon him, was well aware of this weakness in them. That is why, before going out to meet the Quraysh (in the battle of Uḥud), in order to assess the situation, he posed to the Muslims the question of whether they should fight the enemy from within Madīnah, or go out and confront them outside the city. All the true and sincere Muslims enthusiastically responded that they should go out of the city to meet them. The hypocrites, on the other hand, proposed fighting from within Madīnah and enumerated the alleged advantages of such a strategy. This gave the Prophet, peace be upon him, a clear picture of the morale of his army. The weakness of the hypocrites was quite apparent. So after listening to both the groups, he chose the course on which he had already decided − the one that his faithful and sincere followers had so enthusiastically expressed in their determination to fight the enemy outside the city. With this conspiracy of the hypocrites thus coming to naught, for the time being they went along with the decision to fight the Quraysh outside the city. Later, using this as an excuse and saying that since their advice was ignored, their leader Ibn Ubayy returned to Madīnah with three hundred of his companions. Naturally this had a demoralising effect on some groups of the Muslims. To begin with, the total strength of Muslims was only one thousand men compared to three thousand men of the disbelievers’ army. Of this one thousand, the flight of three hundred men at such a critical juncture was a serious blow and the weaker elements among the Muslim army were adversely affected.
Allah is the guardian of the believers
The Qur’ān draws attention to this weakness, saying that those who go out to fight in the cause of Allah, He Himself is their helper and patron, and they should have faith and trust in His help and support. When Allah and His help is with the believers, why should they worry and be unnecessarily concerned at the desertion of a group of hypocrites and cowards?
A reminder of Allah’s help in the battle of Badr
After having made clear the implications of faith and trust in Allah, the Muslims are also reminded of the battle of Badr and how Allah had helped them and given them a resounding victory over their enemies despite their numerical and material weakness. Why should they lose heart now and despair of Allah’s help and mercy? He is still their helper, patron and guardian as before.
Islahi, Amin Ahsan. Pondering Over The Qur’an: Surah Ali Imran (pp. 233-234). Islamic Book Trust. Kindle Edition.