Sure Al-Baqara

2:193

وَقَٰتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌۭ وَيَكُونَ ٱلدِّينُ لِلَّهِ ۖ فَإِنِ ٱنتَهَوْا۟ فَلَا عُدْوَٰنَ إِلَّا عَلَى ٱلظَّٰلِمِينَ

Und kämpft gegen sie, bis es keine Verfolgung mehr gibt und die Religion (allein) Allahs ist. Wenn sie jedoch aufhören, dann darf es kein feindseliges Vorgehen geben außer gegen die Ungerechten.

Tafsir 2:193

Fight the disbelievers until they do not prevent people from Allah’s path and there is no disbelief, and until the dominant way of life is the path of Allah. But if they stop their disbelief and stop preventing others from the path of Allah, then stop fighting them. There is to be no aggression except against those who oppress, through disbelief and by preventing people from the path of Allah.