Samuel specifically speaks of the city of Zarahemla. As the seat of the Nephites, it represents the heart of the Nephite nation both symbolically and literally. It is from the rulers of Zarahemla that the nature of life extends. Since there is little separation between politics and religion, when the political rulers turn away from God, it represents that people who have also turned away such that the voice of the people will not desire evil.
Samuel tells the people that the sword of destruction hangs over the city. The Lord would have destroyed it already were it not for the righteous in it. The salvation of the city by a few righteous should recall to the Nephites the story of Abraham pleading for Sodom before the Lord (see Genesis 18:20-32). The people of Zarahemla have been trained in the scriptures even if they are turning from some of the teachings. This reference to a city saved by a few righteous should surely call Sodom to mind. What it should also do is call to mind the destruction of Sodom. Hence Samuel tells them that they too will cast out the righteous until not even the few remaining righteous will protect them. In that day, Zarahemla will be destroyed as was Sodom. Significantly, both Sodom and Zarahemla were destroyed in the same way, by purging fire (see Genesis 19:24 and 3 Nephi 8:8).