Sahih Muslim 19:4294

It has been reported from Sulaiman b. Buraid through his father that when the Messenger of Allah (may peace be upon him) appointed anyone as leader of an army or detachment he would especially exhort him to fear Allah and to be good to the Muslims who were with him.

He would say: 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 withold 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 Muhairs and inform them that, if they do so, they shall have all the privileges and obligations of the Muhajirs. If they refuse to migrate, tell them that they will have the status of Bedouin Muilims 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.