Taken at face value, the verses in the Quran about warfare seem ambiguous and contradictory. In some places, for example, the Quran urges Muhammad and Muslims to confront opposition with patience and persuasion. These have been called “Verses of Forgiveness and Pardon”:[6]
Invite (all) to the way of thy Lord with wisdom and beautiful preaching; and argue with them in ways that are best and most gracious: for thy Lord knoweth best, who have strayed from His path, and who receive guidance. (16:125)[7]
Nor can goodness and evil be equal. Repel (evil) with what is better. (41:34)
In other places, it gives them permission to engage in retaliatory or defensive fighting:
To those against whom war is made, permission is given (to fight), because they are wronged—and verily, God is most powerful for their aid—(They are) those who have been expelled from their homes in defiance of right (for no cause) except that they say, “our Lord is God.” (22:39-40a)
In yet other places, the Quran seems to command offensive warfare against unbelievers:
Fighting is prescribed for you, and ye dislike it. But it is possible that ye dislike a thing which is good for you, and that ye love a thing which is bad for you. But God knoweth, and ye know not. (2:216)
But when the forbidden months are past, then fight and slay the pagans wherever ye find them, and seize them, beleaguer them, and lie in wait for them in every stratagem (of war); but if they repent, and establish regular prayers and practice regular charity, then open the way for them: for God is Oft-forgiving, Most Merciful. (9:5)
Fight those who believe not in God nor the Last Day, nor hold that forbidden which hath been forbidden by God and His Apostle, nor acknowledge the religion of Truth, (even if they are) of the People of the Book (Christians and Jews), until they pay the jizya [tribute] with willing submission, and feel themselves subdued. (9:29).