Xenelasia
Xenelasia (, ) was the practice in ancient Doric Crete and Lacedæmonia of expelling foreigners deemed injurious to the public welfare. The isolationist customs of Sparta (which included discouraging Spartan citizens from traveling outside the commonwealth) may also sometimes be referred to as xenelasia. The majority of ancient Greek authors attribute the codification of this practice to Lycurgus. Application of Xenelasia laws

In Lacedæmonia
Xenelasia is most famously associated with Sparta. Lacedæmonian magistrates had the authorization to expel any person who posed a threat to public order and morals, for they considered their state a family writ large. While foreigners were allowed in for religious festivals and missions of state, they were generally not permitted to live in the environs, though special exceptions might be given to friends and allies, (laconophiles) like Xenophon. Xenophon himself wrote about xenelasia in his Constitution of the Lacedaemonians:   
There were alien acts in former days, and to live abroad was illegal; and I have no doubt that the purpose of these regulations was to keep the citizens from being demoralized by contact with foreigners; ...Thucydides wrote a speech attributed to Pericles in his History of the Peloponnesian War, which portrays xenelasia as a characteristic of Athens' enemies during the Peloponnesian War. These opponents included the Lacedæmonians:   
If we turn to our military policy, there also we differ from antagonists. We throw open our city to the world, and never by alien acts (ξενηλασίαις / xenelasiais) exclude foreigners from any opportunity of learning or observing, although the eyes of an enemy may occasionally profit by our liberality; trusting less in system and policy than to the native spirit of our citizens... Concerning xenelasia in Lacedæmonia, Plutarch wrote: 

Prof. Karl Otfried Müller writes that the Doric ideal of a "certain loftiness and severity of character" was preserved in Sparta only because it succeeded in keeping herself in an isolated situation. He argues these laws were intended to preserve the native character of the Doric tribe from any taint of foreign influence. However, Müller wrote in the context of a racial, mythographic view of history - they were the invading and occupying force in Lacedæmonia, holding down a population of servile peasants, called Helots, by iron military rule, and so, themselves, in the strict sense, xenoi. 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. In Doric Crete
In Plato's Laws, Clinias the Cretan remarks on Homer that "…we Cretans are not much given to cultivating verse of alien origin." Because Doric Corcyreans were active, industrious and enterprising, good sailors and active merchants, they had entirely lost the stability and noble features of the Doric character. Some said that they exceeded the Athenians in degradation and that even their dogs excelled in impudence. Argos was also a Doric state. It also lost its "noble features of the Doric character". "Argos became such an unsettled state of public affairs, sycophancy and violence became prevalent:…"

Tarentum was also a Doric state, a colony in Magna Graecia. "At a subsequent period, however, as there was no longer men of this stamp (noble character) to carry on the government, and the corruption of manners, caused by the natural fruitfulness of the country, and restrained by no strict laws, was continually on the increase, the state of Tarentum was so entirely changed, that every trace of the ancient Doric character, and particularly of the mother-country, disappeared; hence, although externally powerful and wealthy, it was from its real internal debility, in the end, necessarily overthrown, particularly when the insolent violence of the people became a fresh source of weakness." The brief admiration the Athenians and their allies may have had for Spartan Doric discipline and virtue born of cultural isolation, must be viewed in the context of their early alliance against the Persians, later to be turned to hatred and rebellion in the outcome of the Pelopennesian War and their loss of democracy and autonomy. But well before events turned the other city states against the dominant Sparta, Plato deploys the term "xenelasia" as synonymous with barbarity, an entirely uncivilised condition. He has this to say in the Laws [XII, 950a-b]: "Not to welcome any visitor and never to go out [of your homeland] is, besides, something quite impossible and would, at the same time, be seen in the eyes of other men as a savage and unsocial form of behaviour. It would bring upon you the odious name of someone who hunts down foreigners (xenolasiais) and would earn you the reputation of having rough and brutal manners". op cit. Notes 
"The anxiety of the Dorians, and the Spartans in particular, to keep up the pure Doric character and the customs of their ancestors, is strongly shown by the prohibition to travel, and the exclusion of foreigners, an institution common both to Spartans and Cretans,…"

References

Sources 
Harpers Dictionary of Classical Literature and Antiquities, edited by Harry Thurston Peck, Cooper Square Publishers, Inc., 1896, 1962. see entry Xenelasia. Zaikov A. V. Spartan xenelasiai. (In Russian + German summary.) Published in: Antichnaya Drevnost' i Srednie Veka. Ekaterinburg: The Ural State University, 1999. № 30. Pp. 6–25. (in Russian: Зайков А. В. Спартанские ксенеласии // Античная древность и средние века. Екатеринбург: Уральский государственный университет, 1999. Вып. 30. С. 6–25. ). Politics by region
Ancient Greek law
Doris (Greece)
Dorian Crete
Government of Sparta
Greek words and phrases
Xenophobia
Isolationism