Page 109
yā-ʾayyuhā lladhīna ʾāmanū dhkurū niʿmata llāhi ʿalaykum ʾidh hamma qawmun ʾan yabsuṭū ʾilaykum ʾaydiyahum fa-kaffa ʾaydiyahum ʿankum wa-ttaqū llāha wa-ʿalā llāhi fa-l-yatawakkali l-muʾminūna
O you who have faith! Remember Allah’s blessing upon you when a people set out to extend their hands against you, but He withheld their hands from you, and be wary of Allah, and in Allah let all the faithful put their trust.
— Ali Quli Qarai
Surah Al-Ma'idah, Verse 11
The opinions are divided on that which happening this verse was revealed for. Yet, it can be considered for all the instances that Muslims have relied on Allah and have victoriously rescued when confronting the evil attempt or attack of the enemy. Still, the remembrance of the bounties of Allah (s.w.t.) is a kind of thanksgiving. It takes away pride and negligence from man and increases, his love to the Lord.
Explanations
1. Repelling the harms of the enemy is among the most important favours of Allah.
2. Absorb the grace of Allah to yourself and repel the harm of the enemy through piety, Faith and relying on Him. (Similar to the condition that Allah leaves the enemy to predominate over persons, because of their committing sins, the same is to attentive to Him that causes the harms of enemies to be removed)