Burayda reported,

Whenever the Messenger of Allah ﷺ appointed a commander over an army, he would personally instruct him to fear Allah and to treat the Muslims with him well. He would say, "Fight in the name of Allah and in the cause of Allah. Fight those who disbelieve in Allah. Do not steal from the spoils, do not break treaties, do not mutilate, and do not kill a child.When you meet your enemy from among the polytheists, call them to one of three options. Whichever of them they accept, accept it from them and refrain from fighting them.Call them to Islam. If they accept, accept it from them and refrain from fighting them. Then call them to move from their land to the land of the Muhajirun, and inform them that if they do so, they will have the same rights as the Muhajirun and the same duties as the Muhajirun. If they refuse to move, inform them that they will be like the Muslim bedouins, subject to the same rulings as the bedouins, with no share in the spoils of war or the fay unless they take part in jihad. If they refuse, then seek Allah's help against them and fight them.When you besiege a fortress and they ask you to grant them the protection of Allah and the protection of His Prophet, do not grant them the protection of Allah or the protection of His Prophet. Instead, grant them your own protection and the protection of your companions, for if you violate your own protection and that of your companions, it is a lesser matter than violating the protection of Allah and the protection of His Messenger.When you besiege the people of a fortress and they ask you to bring them down on the judgment of Allah, do not bring them down on the judgment of Allah. Rather, bring them down on your own judgment, for you do not know whether you will get Allah's judgment right concerning them or not," or something to that effect.

Tirmidhi 1617

Sahih

حدثنا محمد بن بشار حدثنا عبد الرحمن بن مهدي عن سفيان عن علقمة بن مرثد

عن سليمان بن بريدة عن أبيه قال

كان رسول الله ﷺ إذا بعث أميرا على جيش أوصاه في خاصة نفسه بتقوى الله ومن معه من المسلمين خيرا وقال اغزوا بسم الله وفي سبيل الله قاتلوا من كفر بالله ولا تغلوا ولا تغدروا ولا تمثلوا ولا تقتلوا وليدا فإذا لقيت عدوك من المشركين فادعهم إلى إحدى ثلاث خصال أو خلال أيتها أجابوك فاقبل منهم وكف عنهم وادعهم إلى الإسلام والتحول من دارهم إلى دار المهاجرين وأخبرهم أنهم إن فعلوا ذلك فإن لهم ما للمهاجرين وعليهم ما على المهاجرين وإن أبوا أن يتحولوا فأخبرهم أنهم يكونوا كأعراب المسلمين يجري عليهم ما يجري على الأعراب ليس لهم في الغنيمة والفيء شيء إلا أن يجاهدوا فإن أبوا فاستعن بالله عليهم وقاتلهم وإذا حاصرت حصنا فأرادوك أن تجعل لهم ذمة الله وذمة نبيه فلا تجعل لهم ذمة الله ولا ذمة نبيه واجعل لهم ذمتك وذمم أصحابك لأنكم إن تخفروا ذمتكم وذمم أصحابكم خير من أن تخفروا ذمة الله وذمة رسوله وإذا حاصرت أهل حصن فأرادوك أن تنزلهم على حكم الله فلا تنزلوهم ولكن أنزلهم على حكمك فإنك لا تدري أتصيب حكم الله فيهم أم لا أو نحو هذا

الترمذي 1617صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Expeditions
Chapter
His ﷺ instructions regarding fighting
Numbering
Darussalam 1617
Tirmidhi 1617