Sura Al-Anfaal

8:39

وَقَٰتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌۭ وَيَكُونَ ٱلدِّينُ كُلُّهُۥ لِلَّهِ ۚ فَإِنِ ٱنتَهَوْا۟ فَإِنَّ ٱللَّهَ بِمَا يَعْمَلُونَ بَصِيرٌۭ

Och kämpa mot dem till dess förtrycket upphör och all dyrkan ägnas Gud. Om de upphör ser Gud vad de gör;

Tafsir 8:39

O believers, fight your disbelieving enemies until there is no more idolatry or Muslims being stopped from Allah’s religion, when religion and obedience is for Allah alone without any partner being put alongside Him. If the disbelievers stop their idolatry and preventing Muslims from Allah’s religion, then leave them, because Allah sees what they do and nothing is hidden from Him.