Narrated Ibn `Umar:That a man came to him (while two groups of Muslims were fighting) and said, "O Abu `Abdur Rahman! Don't you hear what Allah has mentioned in His Book: 'And if two groups of believers fight against each other...' (49.9) So what prevents you from fighting as Allah has mentioned in His Book?"' Ibn `Umar said, "O son of my brother! I would rather be blamed for not fighting because of this Verse than to be blamed because of another Verse where Allah says: 'And whoever kills a believer intentionally..." (4.93) Then that man said, "Allah says:-- 'And fight them until there is no more afflictions (worshipping other besides Allah) and the religion (i.e. worship) will be all for…
وَقَـٰتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌ وَيَكُونَ ٱلدِّينُ كُلُّهُۥ لِلَّهِ ۚ فَإِنِ ٱنتَهَوْا۟ فَإِنَّ ٱللَّهَ بِمَا يَعْمَلُونَ بَصِيرٌ
And fight against them until there is no fitnah and [until] the religion [i.e., worship], all of it, is for Allāh. And if they cease - then indeed, Allāh is Seeing of what they do.
Saheeh International
Sunnah · quoting this verse