WASHINGTON: "Give me your tired, your poor, your huddled masses yearning to breathe free": The words on the Statue of Liberty have beckoned comers to the "Nation of Immigrants" for more than a century.
But not with President Donald Trump at the gate.
Unlike any US leader in decades, Trump has attacked immigration, slashed legal arrivals, called to expel millions of non-citizens, and invited only wealthy and educated foreigners - with an evident preference for white Europeans.
On Thursday, Trump allegedly demanded to know why the US accepted people from "shithole" places like Haiti and Africa, and suggested the country should instead draw immigrants from Norway.
It's a sharp turn for a country that defines itself by its open door and its "melting pot" culture.
IMMIGRANTS WERE 'THREATS'
But historians say US history is pockmarked by immigration backlashes and a constant ambivalence by well-established Americans over whether they want to continue being an immigrant country.
"When you look at the whole history of the United States, one of the most striking aspects of it is the ways in which the debate over immigration has been racialised," said Julie Greene, a professor of history at the University of Maryland.
In 1790 the Naturalization Act aimed to keep blacks from becoming citizens; the Alien Act of 1798 targeted French; The Page Act of 1875 prohibited Asian labour migrants; and in 1924 a sweeping new immigration act took aim at southern and eastern Europeans, largely comprised of Catholics and Jews.
"There was tremendous anti-immigration sentiment throughout the 19th century. At different points in American history, different types of immigrants were considered threats to the United States," said Allan Lichtman, a political historian and professor at American University.
MASSIVE WAVE SPURRED BACKLASH
Before Trump, Warren Harding made anti-immigration the main plank in his successful 1920 presidential campaign.
Harding came to power after a 40-year boom in which about 22 million immigrants poured into the country, and Americans were worried that the latest wave of southern and eastern Europeans - largely Jews and Catholics - would introduce inferior "races" into the country and spearhead Bolshevism.
"Similar to Trump, he portrayed himself as an America-first president," Lichtman said.
The country wrestled with smaller waves over the subsequent decades.
During the depression of the 1930s, there was a backlash against the influx of Mexicans that the 1924 law had given rise to. After World War II came a movement to stem the arrival of refugees.
In 1965 the quota system which favoured northern Europeans was eliminated. Authorities sought to encourage the arrival of people with skills and educations and also to allow more family reunification - what Trump has labeled "chain migration".
As a result, legal immigration soared to one million people a year, a large percentage of them Asian, while illegal immigration from Mexico leapt.
In 1986 President Ronald Reagan offered amnesty to 3.2 million illegal immigrants, but that failed to stem illegal border crossers.
Four years later, President George HW Bush took aim at the lopsided arrivals from Asia with the Green Card lottery, which aimed at diversifying arrivals across the globe.
ECONOMIC UPHEAVAL, TERROR ATTACKS
But by the 2000s anti-immigration sentiment arose anew. It had multiple roots.
The Sep 11, 2001 and subsequent attacks that have focused fears on Muslims, whose presence surged with the lottery system, was one.
Another was the deep change in the structure of the economy, which disrupted communities around the country.
A third was demographic change that left white people a minority in an increasing number of communities around the country.
"Very rapid growth in immigration does sometimes lead to pushback," said Andrew Selee, president of the Migration Policy Institute.
"We are at a point where America's becoming a more diverse society in ways that many Americans are not accustomed to."
With illegal immigrants reaching 12 million, mostly from Mexico and Central America, both presidents George W Bush and Barack Obama tried to stem the flow while attempting to give many a legal path to citizenship.
Yet neither, point out historians, made immigration a political issue like Trump did to win election in 2016.
"Trump very neatly among modern presidents has sought to exploit that for political purposes," said Lichtman. "There is a strong minority anti-immigrant sentiment that Trump tapped into. It's not the majority sentiment."
Unlike anyone since Harding, historians said, Trump made a clear political calculus aimed at whites discomfited by economic and demographic shifts.
"It's easy to generate anxieties about this," Greene said.
"He's definitely more extreme and he's definitely using a kind of dog-whistle racial language, different from the last two presidents."