Fight in the name of Allah and in the way of Allah. Fight against those who disbelieve in Allah. Make a holy war, do not embezzle the spoils; do not break your pledge; and do not mutilate (the dead) bodies; do not kill the children. When you meet your enemies who are polytheists, invite them to three courses of action. If they respond to any one of these, you also accept it and withhold yourself from doing them any harm. Invite them to (accept) Islam; if they respond to you, accept it from them and desist from fighting against them. Then invite them to migrate from their lands to the land of the Muhajireen and inform them that, if they do so, they shall have all the privileges and obligations of the Muhajireen. If they refuse to migrate, tell them that they will have the status of Bedouin Muslims and will be subjected to the Commands of Allah like other Muslims, but they will not get any share from the spoils of war or Fai' except when they actually fight with the Muslims (against the disbelievers). If they refuse to accept Islam, demand from them the Jizya. If they agree to pay, accept it from them and hold off your hands. If they refuse to pay the tax, seek Allah's help and fight them. When you lay siege to a fort and the besieged appeal to you for protection in the name of Allah and His Prophet, do not accord to them the guarantee of Allah and His Prophet, but accord to them your own guarantee and the guarantee of your companions for it is a lesser sin that the security given by you or your companions be disregarded than that the security granted in the name of Allah and His Prophet be violated. When you besiege a fort and the besieged want you to let them out in accordance with Allah's Command, do not let them come out in accordance with His Command, but do so at your (own) command, for you do not know whether or not you will be able to carry out Allah's behest with regard to them. (Using translation from Muslim 1731a)
كَانَ رَسُولُ اللهِ ﷺ إِذَا أَمَّرَ أَمِيرًا عَلَى جَيْشٍ أَوْ سَرِيَّةٍ أَوْصَاهُ فِي خَاصَّتِهِ بِتَقْوَى اللهِ وَمَنْ مَعَهُ مِنَ الْمُسْلِمِينَ خَيْرًا ثُمَّ قَالَ اغْزُوا بِسْمِ اللهِ فِي سَبِيلِ اللهِ قَاتِلُوا مَنْ كَفَرَ بِاللهِ اغْزُوا وَلَا تَغُلُّوا وَلَا تَغْدِرُوا وَلَا تُمَثِّلُوا وَلَا تَقْتُلُوا وَلِيدًا وَإِذَا لَقِيتَ عَدُوَّكَ مِنَ الْمُشْرِكِينَ فَادْعُهُمْ إِلَى إِحْدَىثَلَاثِ خِصَالٍ أَوْ خِلَالٍ فَأَيَّتُهُنَّ مَا أَجَابُوكَ إِلَيْهَا فَاقْبَلْ مِنْهُمْ وَكُفَّ عَنْهُمْ ادْعُهُمْ إِلَى الْإِسْلَامِ فَإِنْ أَجَابُوكَ إِلَيْهِ فَأْقَبْل مِنْهُمْ وَكُفَّ عَنْهُمْ ثُمَّ ادْعُهُمْ إِلَى التَّحَوُّلِ مِنْ دَارِهِمْ إِلَى دَارِ الْمُهَاجِرِينَ وَأَخْبِرْهُمْ أَنَّهُمْ إِنْ فَعَلُوا أَنَّ لَهُمْ مَا لِلْمُهَاجِرِينَ وَعَلَيْهِمْ مَا عَلَى الْمُهَاجِرِينَ وَإِنْ هُمْ أَبَوْا أَنْ يَتَحَوَّلُوا مِنْهَا فَأَخْبِرْهُمْ أَنَّهُمْ يَكُونُونَ كَأَعْرَابِ الْمُسْلِمِينَ يَجْرِي عَلَيْهِمْ حُكْمُ اللهِ الَّذِي يَجْرِي عَلَى الْمُسْلِمِينَ وَلَا يَكُونُ لَهُمْ فِي الْغَنِيمَةِ وَالْفَيْءِ شَيْءٌ إِلَّا أَنْ يُجَاهِدُوا مَعَ الْمُسْلِمِينَ فَإِنْ هُمْ أَبَوْا فَسَلْهُمُ الْجِزْيَةَ فَإِنْ هُمْ أَجَابُوكَ فَاقْبَلْ مِنْهُمْ وَكُفَّ عَنْهُمْ وَإِنْ هُمْ أَبَوْا فَاسْتَعِنْ بِاللهِ وَقَاتِلْهُمْ وَإِذَا حَاصَرْتَ أَهْلَ حِصْنٍ فَأَرَادُوكَ أَنْ تَجْعَلَ لَهُمْ ذِمَّةَ اللهِ وَذِمَّةَ نَبِيِّكَ فَلَا تَجْعَلْ لَهُمْ ذِمَّةَ اللهِ وَلَا ذِمَّةَ نَبِيِّهِ وَلَكِنْ اجْعَلْ لَهُمْ ذِمَّتَكَ وَذِمَّةَ أَبِيكَ وَذِمَمَ أَصْحَابِكَ؛ فَإِنَّكُمْ إِنْ تُخْفِرُوا ذِمَمَكُمْ وَذِمَمَ آبَائِكُمْ أَهْوَنُ مِنْ أَنْ تُخْفِرُوا ذِمَّةَ اللهِ وَذِمَّةَ رَسُولِهِ وَإِنْ حَاصَرْتَ أَهْلَ حِصْنٍ فَأَرَادُوكَ أَنْ تُنْزِلَهُمْ عَلَى حُكْمِ اللهِ فَلَا تُنْزِلْهُمْ عَلَى حُكْمِ اللهِ وَلَكِنْ أَنْزِلْهُمْ عَلَى حُكْمِكَ؛ فَإِنَّكَ لَا تَدْرِي أَتُصِيبُ حُكْمَ اللهِ فِيهِمْ أَمْ لَا قَالَ عَبْدُ الرَّحْمَنِ هَذَا أَوْ نَحْوَهُ