Sanhedrin, Chapter 10, Mishnah 5. We continue to discuss the laws of an ir hanidachas, and in this Mishnah, several verses are expounded. The first of them is "hakeh sakeh" - to strike and destroy. The completion of the verse's wording, as brought by the Mishnah, is: "es yoshvei ha'ir hahi lefi charev" - the inhabitants of that city with the edge of the sword, and from the seemingly superfluous words, a halachah is derived.
Who are the "inhabitants of the city":
A caravan of donkey drivers or camel drivers passing from place to place, whose people stayed in the subverted city for at least thirty days - they are included among the inhabitants of the city.
The emphasis made by the Mishnah is that these people may save the city. A condition for an ir hanidachas is that the majority of the city's people turn to idol worship, whereas the people in the caravan are outsiders who have been staying in the place for just about thirty days. They are not part of the central community, and therefore they are not necessarily drawn after the rest of the city's residents to worship idols - yet nevertheless, in calculating the majority, they are counted as part of the denominator.
For example: in a city with one hundred residents, where twenty people passed through and stayed for about a month, the denominator stands at one hundred and twenty, and sixty-one people who turned to idol worship are required to constitute a majority. Without the caravan members, fifty-one out of a hundred would have constituted a majority; the inclusion of the caravan members tips the scales, and ultimately the idol worshippers remain a minority.
However, even though this is the case, it is not necessarily for the best - as it can also work to the detriment of the city. If the idol worshippers include these temporary residents passing through, they will tip the scales in the opposite direction. The fundamental point is therefore this: those who stay in the city for at least thirty days are counted as residents of the city regarding the calculation that determines whether the majority turned to idol worship.
Destroying the city and its property:
The second part of the Mishnah establishes that the entire city and everything in it is proscribed and forbidden. First we will explain the principle, and then we will examine the actual wording of the Mishnah. The derivations come to teach that everything in the city is destroyed, whether it belongs to the guilty people who worshipped idols or whether it belongs to the innocent people who did not - everything is destroyed.
But there is a difference between the two:
The property of those who sinned with idol worship: All their property is destroyed, even if it is not currently located in the city. Even property sitting in a safe in Switzerland must be destroyed, and it does not pass to their heirs.
The property of the rest of the people: Their property that is located outside the city is not destroyed.
And why should the innocent be punished and their property inside the city be destroyed? A wonderful explanation is offered for this: those people should have gotten up and moved to another place. What business did they have dwelling in a city where the majority of Jews had become idol worshippers? It is clear that they remained there because they did not want to abandon their property. Since they made a poor decision, it is fitting that this very property, which prevented them from doing what was required of them in the service of God, should also be destroyed.
In the words of the Mishnah:
"Mikra amur" - this is what we learn from the verse.
"Nichsei tzaddikim shebesochah, ovdin" - the property of the innocent people who did not worship idols, which is located inside the city, is lost and destroyed.
"Shebachutzah, peltin" - the property of those same people that is located outside the city is saved and not destroyed.
"Veshel reshaim, bein shebesochah bein shebachutzah, harei elu ovdin" - the property of the idol worshippers in the condemned city, whether it is located inside the city or outside of it, all must be destroyed.
The source for this - two derivations:
"Kol" - the verse says, "Destroy it and all [kol] that is in it," and the word "kol" always serves to include. Here it includes that even property that is not in the city is destroyed, and not just the city itself.
"Osah" - from the extra word "osah" we learn that the property of the righteous belonging to the city, which is currently located inside it, is destroyed, while their property outside the city is saved from destruction.
In summary: In this Mishnah we learned two matters. The first - those staying in the city for thirty days, and even members of a caravan passing through on their way, are counted among the inhabitants of the city regarding the calculation of the majority that turned to idol worship, and thereby may tip the scales one way or the other. The second - the law of the property: everything in the city is destroyed, whereas outside the city, the property of the sinners is lost and the property of the rest of the people is saved, as derived from the words "kol" and "osah" in the verse.