It was narrated from Ibn Buraidah that his father said:
“Whenever he appointed a man to lead a military detachment, the Messenger of Allah (ﷺ) would advise him especially to fear Allah and treat the Muslims with him well. He (ﷺ) said: ‘Fight in the Name of Allah and in the cause of Allah. Fight those how disbelieve in Allah. Fight but do not be treacherous, do not steal from the spoils of war, 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 then accept it from them and refrain from fighting them. Then invite them to leave their land and move to the land of the polytheists. Tell them that if they do that, then they will have the same rights and duties as the polytheists. If they refuse, then tell them that they will be like the Muslim Bedouins (who live in the desert), subject to the same rulings of Allah as the believers. But they will have no share of Fay’* or war spoils, unless they fight alongside the Muslims. If they refuse to enter Islam, then ask them to pay the Poll-tax. If they do that, then accept it from them and refrain from fighting them. But if they refuse, then seek the help of Allah against them and fight them. If you lay siege to them and they want you to give them the protection of Allah and your Prophet, do not give them the protection of Allah and your Prophet, rather give them your protection and the protection of your father and your Companions, for if you violate your protection and the protection of your fathers, that is easier than violating the protection of Allah and the protection of His Messenger. If you lay siege to them and they want you to let them come out with a promise of the judgement of Allah and His Messenger (ﷺ), do not offer them a promise of the judgement of Allah and His Messenger (ﷺ), rather offer them your judgement, because you do not know if you will actually pass (the same as) Allah’s judgement regarding them or not.’”