Deuteronomy 20:10

20:10 When you approach a city to wage war against it, offer it terms of peace.

Deuteronomy 20:12

20:12 If it does not accept terms of peace but makes war with you, then you are to lay siege to it.