When thou comest nigh unto a city to fight against it
This is to be understood of an arbitrary war, as Jarchi observes; which they engaged in of themselves, or were provoked to by their enemies; which was their own choice, and according to their own will and pleasure; and their conduct towards their enemies in it was different from that in a war with the seven nations, commanded by the Lord, and distinguished from it, ( Deuteronomy 20:15 Deuteronomy 20:16 ) .
then proclaim peace unto it;
that is, offer them terms of peace; which were, that the inhabitants of it should renounce idolatry, and become their tributaries and servants.