{O you who have believed, when you encounter a company [of the enemy],} meaning: of the polytheists, {stand firm} in your ranks. {And remember Allah much,} Qatadah said: Allah made His remembrance obligatory during the striking with swords.
Surah al-Anfal from verse (46) to verse (48).
﴿يَا أَيهَا الَّذِينَ آمَنُوا إِذَا لَقِيتُمْ فِئَةً﴾ يَعْنِي: من الْمُشْركين ﴿فاثبتوا﴾ فِي صُفُوفِكُمْ. ﴿وَاذْكُرُوا اللَّهَ كَثِيرًا﴾ قَالَ قَتَادَةُ: افْتَرَضَ اللَّهُ ذِكْرَهُ عِنْد الضراب بِالسُّيُوفِ.
سُورَة الْأَنْفَال من الْآيَة (٤٦) إِلَى الْآيَة (٤٨).