Sayyiduna Buraydah (may Allah be pleased with him) says that whenever the Messenger of Allah (peace and blessings be upon him) appointed a commander over an army, he would counsel him to fear Allah and to treat the Muslims (with him) well, and then he said: "Fight in the name of Allah and in His way. Fight those who disbelieve in Allah; kill them, but do not deceive, do not act treacherously, do not mutilate, and do not kill children. When you meet the enemy, invite them to accept one of three conditions; if they accept any one of them, accept it from them and hold back your hand from them. Invite them to Islam; if they accept, accept it from them and refrain from them. Then invite them to move from their homes to the abode of the Muhajirun, and tell them that if they do so, they will have what the Muhajirun have and the responsibilities that the Muhajirun bear. If they do not wish to move from their homes to the Muhajirun, tell them that their status will be like that of the Bedouin Muslims: the rulings of Allah that apply to the Bedouins will be applied to them, and they will receive nothing from the fay' or the spoils of war, unless they go out on jihad with the Muslims. If they refuse this, demand the jizyah from them; if they pay the jizyah, hold back your hand from them. If they do not accept even this, seek Allah's help against them and fight them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17949