It is narrated from Buraidah (may Allah be pleased with him) that when the Messenger of Allah (ﷺ) would send out an army, he would appoint a commander over them and say: "When you meet your polytheist enemies (on the battlefield), invite them to three things or three qualities. Alqamah was uncertain about these words. Invite them to accept Islam (first of all). If they accept your invitation, then accept it from them and withhold your sword from them. Then, if they accept Islam, invite them to leave their homeland and come to where the Muhajirun reside, and inform them that if they migrate, they will have the same benefits as the Muhajirun and the same obligations as the Muhajirun. If they choose to remain in their own place, they will be like the Bedouin Muslims; Allah's command will apply to them as it does to other Muslims, but they will have no share in the spoils of war (fay’) unless they fight alongside the Muslims (then they will have a share in the booty and fay’). If they refuse to accept this, then tell them to pay jizyah with their own hands in a state of humiliation. If they do this, accept it from them and leave them alone. But if they refuse even this, then seek help from Allah and fight them."
Hadith Referenceمسند الإمام الشافعي / كتاب الجهاد وقسم الغنائم / 1732
Hadith Takhrijاخرجه مسلم و الجهاد، باب تأمير الامام الأمراء على البعوث ، ووصيته اياهم ..... الخ (1731)۔
It is narrated from Buraidah (may Allah be pleased with him) that whenever the Prophet (peace and blessings be upon him) would send out an army, he would appoint a commander over them... then he narrated a lengthy hadith.
Hadith Referenceمسند الإمام الشافعي / كتاب الجهاد وقسم الغنائم / 1733