Quran 9:5 — Ultimatum (Bara'ah)
Once the Sacred Months are past, (and they refuse to make peace) you may kill the idol worshipers when you encounter them, punish them, and resist every move they make. If they repent and observe the Contact Prayers (Salat) and give the obligatory charity (Zakat), you shall let them go. GOD is Forgiver, Most Merciful.
[9:4] If the idol worshipers sign a peace treaty with you, and do not violate it, nor band together with others against you, you shall fulfill your treaty with them until the expiration date. GOD loves the righteous.
[9:6] If one of the idol worshipers sought safe passage with you, you shall grant him safe passage, so that he can hear the word of GOD, then send him back to his place of security. That is because they are people who do not know.