Surah Al-Anfal, ayah 39

8:39

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

Waqātilūhum hattā lā takūna fitnatun wayakūnad-dīnu kulluhū lillāhi fa inintahaw fa innallāha bimā ya'malūna basīr

And fight against them until there is no fitnah446 and [until] the religion [i.e., worship], all of it, is for Allāh.447 And if they cease - then indeed, Allāh is Seeing of what they do.

Footnotes

446 Persecution. See footnote to 2:191.

447 i.e., until polytheism is no longer dominant.