it's right there in the Quran.
[9:5] But when the forbidden 4 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 practise regular charity, then open the way for them: for Allah is Oft-forgiving, Most Merciful.[Quran 9:5–5 (Translated by Yusuf Ali)]
The next verse (often excluded from quotes) appears to present a conditional reprieve:
[9:6] If one amongst the Pagans ask thee for asylum, grant it to him, so that he may hear the word of Allah; and then escort him to where he can be secure. That is because they are men without knowledge.[Quran 9:6–6 (Translated by Yusuf Ali)]