Buraydah ibn al-Husayb al-Aslami (may Allah be pleased with him) reported: Whenever the Prophet (may Allah's peace and blessings be upon him) appointed a man to lead an army or a military detachment, he would advise him to fear Allah and treat well those Muslims who are with him. He would say: "Fight in the name of Allah and in the cause of Allah. Fight those who disbelieve in Allah. Fight, but do not steal from the spoils of war, do not be treacherous, do not mutilate, and do not kill children. When you meet your enemy from among the polytheists, call them to one of three things. Whichever of them they respond to, accept it from them and refrain from fighting them. Invite them to accept Islam, and if they respond, accept it from them and refrain from fighting them. Then invite them to leave their land and move to the land of the Emigrants (Madīnah). Tell them that if they do so, they will have the same rights and duties as the Emigrants. If they refuse to move, tell them they will be like the Muslim Bedouins, subject to the rulings of Allah, and they will have no share in war booty or spoils of war, unless they fight alongside the Muslims. If they refuse to enter Islam, ask them to pay the Jjizyah (poll tax paid by non-Muslims). If they do so, accept it from them and refrain from fighting them. But if they refuse, seek the help of Allah against them and fight them. If you besiege a group and they want you to give them the covenant of Allah and His Prophet, do not give them the covenant of Allah and His Prophet, instead give them your own covenant and the covenant of your companions, for if you violate your covenant and the covenant of your companions, that is easier than violating the covenant of Allah and the covenants of His Prophet. If you besiege a group of people and they want you to apply the judgment of Allah upon them, do not offer them that, but rather offer them your own judgment, because you do not know whether you would apply correctly the judgment of Allah upon them."
Authentic hadith - Narrated by Muslim