The United States began as a nation of immigrants, and it continues to be so today. The ability to absorb people from around the globe is a hallmark of American exceptionalism.

America has succeeded mostly through what The Heritage Foundation’s Mike Gonzalez has called “patriotic assimilation,” in which immigrants have not just been taught how to adapt to the economy of the U.S., but also the customs and beliefs of larger American culture.

It is this fading notion of assimilation that has been a great strength for America since its founding. But, the extraordinarily welcoming nature of this country can be turned against it; assimilation simply won’t work on those who are expressly opposed to the idea.

U.S. immigration laws have varied over the country’s history, but they have generally evolved to meet internal needs and external threats.

The Wall Street Journal reported earlier this month that President Donald Trump’s administration is considering “extreme vetting” of both visitors to the U.S. and potential immigrants to prevent terrorist attacks from occurring within American borders.

This is in line with a campaign speech in which Trump said he wanted to weed out terrorist sympathizers with “hostile attitudes towards our country or its principles” from coming into the country.

While details of what Trump’s extreme vetting will look like are unclear, some have already come out to call it “Muslim-targeted” and likely to be ineffective.

It is important to keep the current debate in perspective of our changing immigration laws through the centuries.

Founders Warn of the ‘Grecian Horse’

The Founding Fathers had different ideas about immigration, but almost universally understood that it was important for new arrivals to both adapt to the American norms and also not present a direct threat to the United States.

Thomas Jefferson noted in his famous “Notes on the State of Virginia” that a good immigration policy is not simply about numbers of arrivals and labor markets.

He asked rhetorically: “ … Are there no inconveniences to be thrown into the scale against the advantage expected from a multiplication of numbers by the importation of foreigners?”

Jefferson argued that the U.S. was built on a unique set of principles, and that Americans should be cautious when importing people from tyrannical countries.

Alexander Hamilton, who was an immigrant himself, also warned of “too unqualified admission of foreigners,” but said there was a “wide difference between closing the door altogether and throwing it entirely open.”

“To admit foreigners indiscriminately to the rights of citizens, the moment they put foot in our country … ” Hamilton cautioned, “ … would be nothing less, than to admit the Grecian Horse into the citadel of our liberty and sovereignty.”

The Founders’ solution to the conundrum of being a land that both welcomes immigrants, yet keeps its core ideals intact, is assimilatory schools, homes, and general culture. Additionally, laws would be put in place to create a rigorous naturalization process to weed out those hostile to American liberty.

Those who truly wanted to become Americans would be welcomed with open arms, but the burden was placed on the immigrant to show that he was willing to take the extra steps to adapt to living in a new land. He had to prove that he wanted to be a good citizen who held an unqualified belief in the founding documents.

‘Principles Hostile to All Government’

There was generally little control of immigration during the early part of the 19th century—in part due to the fact that the country was land rich and labor poor. Ideological vetting was rarely on the table.

However, immigration laws changed as the century wore on and the population expanded, becoming more stringent, and, unfortunately, at times nativist.

But in response to outside, ideological attacks on the American way of life toward the beginning of the 20th century, immigration laws were adjusted to weed out those who specifically intended to destroy the foundations of the country.

For instance, immigration laws changed in response to the threat of anarchism. After the Haymarket bombing in 1886—likely conducted by anarchist agitators—and the assassination of President William McKinley by anarchist Leon F. Czolgosz in 1901, the American people were ready to take decisive action against this rising peril.

So Congress passed the Anarchist Exclusion Act in 1903 in an attempt to keep hostile ideologues out of the country. The legislation was strongly supported by President Theodore Roosevelt, a proponent of assimilation who railed against the creation of “hyphenated Americans” and anarchist violence.

Roosevelt said in support of the 1903 law in his first annual message to Congress:

I earnestly recommend to the Congress that in the exercise of its wise discretion it should take into consideration the coming to this country of anarchists or persons professing principles hostile to all government and justifying the murder of those placed in authority … They and those like them should be kept out of this country; and if found here they should be promptly deported to the country whence they came.

Similar legislation to the 1903 law was passed throughout the 20th century to exclude communists and fascists seeking to emigrate to America.

These laws were curtailed by the Immigration Act of 1990 at the close of the Cold War in response to the receding threat of international communism. However, the current process of naturalization still contains a basic ideological test for newcomers, including the oath immigrants must recite renouncing allegiance to foreign governments while upholding support for the Constitution.

Throughout American history, ideological vetting of immigrants seeking to obtain the blessing of U.S. residency and citizenship has occasionally been used in cases of a perceived threat from abroad. As many Founders suggested, if the United States is truly a sovereign country with a Constitution designed for “we, the people,” then Americans have a right to exclude those who wish to destroy it.