Deuteronomy 20:11

11 If it accepts your terms of peace and surrenders to you, then all the people in it shall serve you at forced labor.

Deuteronomy 20:11 In-Context

9 When the officials have finished addressing the troops, then the commanders shall take charge of them.
10 When you draw near to a town to fight against it, offer it terms of peace.
11 If it accepts your terms of peace and surrenders to you, then all the people in it shall serve you at forced labor.
12 If it does not submit to you peacefully, but makes war against you, then you shall besiege it;
13 and when the Lord your God gives it into your hand, you shall put all its males to the sword.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.