Later, partially in reaction against the Bolshevik Revolution and the rising tide of socialism in Europe, a more general anti-immigrant sentiment gripped America. For example, through the Palmer Raids of the 1920s, the Department of Justice rounded up thousands of foreigners who were alleged communists, anarchists, labor reformers, or otherwise menaces to society. Many were forcibly deported.
World War I was America’s first extensive international conflict, but legal precedent existed for the mistreatment of resident foreigners.
In 1798, the threat of war with France loomed: immigrants from France and Ireland — a nation aligned with the anti-British French — were viewed with political suspicion. Accordingly, Congress passed four laws collectively known as the Alien and Sedition Acts. The Naturalization Act required aliens to be residents for 14 years before becoming eligible for citizenship. The Alien Act authorized the deportation of “dangerous” aliens. The Alien Enemies Act allowed the arrest, imprisonment, and deportation of any alien who was the subject of an enemy power.