When your Lord revealed to the angels: I am with you, therefore make firm those who believe. I will cast terror into the hearts of those who disbelieve. Therefore strike off their heads and strike off every fingertip of them [Quran 8:12]
These verses were revealed when the Muslims were in a bitter struggle with the pagans of Mecca who were persecuting them. Here the reference is to Battle of Badr when a Pagan army consisting of about a thousand soldiers was heading toward Madina to destroy the Musims. There was another trade caravan of the pagans, which also had 30 to 40 armed guards, and it was heading towards Mecca. Because the Muslim consisted of only 300 people with only two or three horses and 70 camels, it was suggested that the Muslims should launch an attack on this caravan and thus divert the attention of the pagans. The Muslims decided to confront the pagan army instead. In these passages, God is comforting the Muslims and encouraging those who were weak of heart that it is time to confront the enemy, otherwise, Muslims would be wiped out from the face of the earth.