The Prophet ﷺ said, "A believer is not to be killed in retaliation for a disbeliever, nor is one bound by a covenant to be killed during the term of his covenant."
حدثنا محمد بن عبد الأعلى الصنعاني حدثنا معتمر بن سليمان عن أبيه عن حنش عن عكرمة
عن النبي ﷺ قال لا يقتل مؤمن بكافر ولا ذو عهد في عهده
Sourcing, sahih, though Busiri graded it daif because of Hanash. See hadith 2446. The hadith has other routes in Abu Dawud, hadith 4506 and 4530, and Ibn Hibban (Mawarid), hadith 1699, and others.