עמון ומואב טיהרו בסיחון:
Slaves have the same din as land. The following is discussing non Jews taking land from non Jews.
Rashi:
“...I could say that this Halacha , that a gentile can acquire a gentile as a slave for the rights to his labor, applies only to acquisition via money. However, via an act of possession, by taking him captive, he does not acquire him. Rav Pappa says in response: The land of Ammon and Moab became purified through the conquest of Sichon. After the conquest of Sichon, the land that had belonged to Ammon and Moab was considered the property of Sichon. In the same manner, a gentile can acquire a slave by taking possession of him as a captive”
-גיטין לח
Tosfos there explains that this acquisition was through war
The Ritva adds: although technically land can’t be stolen, possession by war is different.
The Pnei Yehoshua explains the change of ownership is by means of despair rather then acquisition.
מלך אפי' נכרי שכבש איזו מדינה במלחמה קונה אותה... לפי שזהו ממשפטי וחוק המלכות ... ומשפטי המלכות הם דין גמור כדין של תורה
A king, even a non-Jewish king, that conquered a country through war acquires it. Because these are the rules and laws of kingdoms. And the rules of the kings are actual laws of Torah.
שוע"ר הל' הפקר והשגת גבול סעי' ג