Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:17:54

Your Lord is most knowing of you. If He wills, He will have mercy upon you; or if He wills, He will punish you. And We have not sent you, ˹O Muhammad˺, over them as a manager.  

Your Lord knows you best. If He will, He will have mercy on you, by way of ˹granting you˺ repentance and faith, or, if He will, for you to be chastised, He will chastise you, by having you die in disbelief. And We did not send you to be a guardian over them, and so compel them to ˹embrace˺ faith — this was ˹revealed˺ before the command to fight ˹them˺.
القرآن:١٧:٥٤

رَبُّكُمْ أَعْلَمُ بِكُمْ ۖ إِنْ يَشَأْ يَرْحَمْكُمْ أَوْ إِنْ يَشَأْ يُعَذِّبْكُمْ ۚ وَمَا أَرْسَلْنَاكَ عَلَيْهِمْ وَكِيلًا  

{ربكم أعلم بكم إن يشأ يرحمكم} بالتوبة والإيمان {أو إن يشأ} تعذيبكم {يعذبكم} بالموت على الكفر {وما أرسلناك عليهم وكيلاً} فتجبرهم على الإيمان وهذا قبل الأمر بالقتال.