The Torah establishes a fundamental distinction in warfare between engaging distant enemies and fighting the nations living within the borders of the Promised Land. When fighting a distant enemy, the military rules allow for a degree of leniency, permitting the conquering army to spare the lives of women and children and to take the city's spoils. As part of this allowance, soldiers are even permitted to eat non-kosher food found among the enemy's plunder [מלבי״ם]. In sharp contrast, the seven nations residing within the land face total destruction if they do not surrender. The reason for this severe approach is the danger of spiritual influence, as leaving them alive in the land would risk teaching the Israelites to sin and adopt their destructive practices [רלב״ג, העמק דבר].
While commentators agree that the final outcome of war differs between these two groups, there is a debate regarding how a military campaign begins. One approach suggests that a peaceful resolution is offered to all nations without exception. According to this view, the harsh rules reserved for the seven nations are only enacted if they actively refuse the initial peace offer [מלבי״ם, רש״ר הירש]. Conversely, another perspective argues that an offer of peace is never extended to the seven local nations in the first place [מלבי״ם].
The definition of a distant city relies on both geography and national identity. The primary approach among commentators is that these are cities located entirely outside the Land of Israel, whose inhabitants do not belong to the seven local nations [אבן עזרא, ביאור שטיינזלץ] or to the descendants of Amalek [ביאור יש״ר]. The emphasis on extreme distance serves to carefully refine this rule. It may specifically exclude cities that sit immediately outside the borders of the land [רש״ר הירש]. Other commentators explain that geographic distance does not erase a nation's core identity. If members of the seven nations wander far away and establish cities in distant places, such as Africa, they are still treated according to the strict laws of the seven nations rather than the lenient rules of distant cities [העמק דבר, צפנת פענח]. Finally, another angle suggests that this distance was originally measured from the Israelites' camp in the desert, reflecting the reality that the future borders of their land would eventually stretch far out in every direction [ספורנו].