Niccolò Machiavelli believed that Sparta lasted a long time because "she did not permit strangers to establish themselves in the republic" and remarked that the Roman Republic took the opposite course of Sparta spelling her doom. The population of Sparta was in decline from the time of its victory in the Peloponnesian Wars, falling from 9,000 Spartiates in 640 to 1,000 after the battle of Leuctra in 371, due to the refusal of miscegenation, selective infanticide and the desertion of patrician scions to more attractive foreign parts. The Roman polis, in addition, is the one society in the ancient world which most modeled itself on the Spartan military ethos.