وَقَاتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌ وَيَكُونَ الدِّينُ كُلُّهُ لِلَّهِ ۚ فَإِنِ انتَهَوْا فَإِنَّ اللَّهَ بِمَا يَعْمَلُونَ بَصِيرٌ (39)
(8:39) And fight against them until the mischief ends and the way prescribed by Allah - the whole of it -prevail *31 Then, if they give up mischief, surely Allah sees what they do.
*31). This is a reiteration of the purpose, mentioned earlier in al-Baqarah 2: 193, for which Muslims are required to wage war. The purpose is two-fold. Negatively speaking, the purpose is to eradicate 'mischief'. The positive purpose consists of establishing a state of affairs wherein all obedience is rendered to God alone. This alone is the purpose for which the believers may, rather should, fight. Fighting for any other purpose is not lawful. Nor does it behove men of faith to take part in wars for worldly purposes. (For further explanation see Towards Understanding the Qur'an, vol. 1, al-Baqarah 2, nn.. 204 and 205, pp. 152-3 - Ed.)