America's self-image is forever intertwined with the melting pot. It's a nation that welcomes the world's wretched refuse, a nation built by immigrants, a nation whose very motto is "E Pluribus Unum" — Out of Many, One.
America's history also is replete with efforts to shut the golden door to arrivals from China, from Eastern and Southern Europe — and most recently, from predominantly Muslim nations.
America's relationship with immigration is ... complicated.
"Many of us — politicians, people who are speaking out against the impact of the administration's actions — are saying, 'We are a nation of immigrants. This goes against our most important values.' And that is absolutely true," said Erika Lee, director of the Immigration History Research Center at the University of Minnesota. "But we also have a long record of barring immigrants, denigrating them, building walls. That's the flip side."
Said Mae Ngai, a professor of history at Columbia University and author of "Impossible Subjects: Illegal Aliens and the Making of Modern America": "We struggle over these things. Both strains have always been present."
The leaders of colonial America knew they needed immigrants to populate their new land. But Benjamin Franklin grumbled about an influx of "swarthy" Germans, and the Alien and Sedition Acts of 1798 made it harder to attain citizenship and easier to deport non-citizens deemed dangerous.
The acts were controversial; most were allowed to expire in a few years, but the deportation law remains, even today. And their justification — that some or many immigrants were dangerous interlopers — has been invoked again and again.
The rise of the Know Nothings, a nativist and populist movement of the 1840s and '50s, was spurred by the rise in German and Irish immigration, and by fears that the Catholic newcomers were loyal to a foreign entity — the pope — and incompatible with American values.
"If you substitute 'Muslim' for 'Catholic,' they would sound very similar to what you hear today," Lee said.
In 1868, the U.S. signed a treaty encouraging Chinese migration; 24 years later, the Chinese Exclusion Act turned away immigrants from what was even then the world's most populous nation.
What had happened in between? The Chinese immigrants who had shouldered much of the work of building the West had come to be seen as a threat — the "Yellow Peril."
Fear and bigotry were intermixed. In 1917, Congress passed legislation requiring a literacy test for immigrants, though only after four presidential vetoes. "They knew they couldn't say, 'Keep out the Jews and the Italians,'" but that was the purpose, Ngai said.
In 1921 and 1924, in the aftermath of World War I and the Red Scares that followed the Russian Revolution, the first quotas took effect, setting limits for immigration from countries that were seen as undesirable. There was to be little immigration from Africa, none from Asia or Arab countries, and the flow from southern and eastern Europe was curtailed.
Jewish refugees from Europe were blocked during and after World War II — first because of fears that they might be German sympathizers, then because of fears that they were Communists. "History doesn't look too kindly on this, because we know how preposterous this was," said Rebecca Kobrin, an assistant professor of history at Columbia.
But for all Americans' suspicions of immigrants, said Maria Cristina Garcia, professor of American studies at Cornell University, there has been an appreciation of what they did.
"Since the early republic, Americans have recognized that immigrants are essential to nation-building: Immigrants farmed the prairies, worked in the factories, built the streets, canals and railroad tracks. They mined the ore, planted and harvested the crops, and provided basic services. Government and business actively recruited foreign labor to facilitate economic growth," she said.
As hard as it often was — and as much bigotry as immigrants endured — immigration became central to the American narrative.
"It's fundamental," said William Thiesen, 37, a New Yorker visiting the city's Tenement Museum on Tuesday. "I think being an American is being an immigrant. It's the American fabric. We're all immigrants."
It was Israel Zangwell, a British writer, who dubbed America "the Melting Pot" in his 1908 play of the same name. His Russian-Jewish immigrant hero proclaims: "what is the glory of Rome and Jerusalem where all nations and races come to worship and look back, compared with the glory of America, where all races and nations come to labour and look forward!"
More than 100 years later, despite some apprehensions of the moment, that feeling persists.
"America has been the dream for every educated young person," said Sontu Barua, a government employee in the sprawling Indian city of Lucknow. "It remains a land of opportunity."
More than 700,000 citizenship applications were filed from October 2015 to June 2016, about 25 percent more than the year before. The U.S. issued more than 10 million visas in 2015.
But the United States is far less inviting than it once was: The number of immigrants obtaining legal permanent resident status in 2010 was just over a million — almost precisely the same number as it was a hundred years earlier, when the population was less than a third of what it is now.
American ambivalence is reflected in the Statue of Liberty. Emma Lazarus's "The New Colossus," with its siren call to "your tired, your poor, your huddled masses yearning to breathe free, the wretched refuse of your teeming shore," is inscribed on a tablet in the statue's base. Lady Liberty herself, a gift from France to commemorate the American and French revolutions, is not placed to welcome immigrants.
"She faces the city," said Columbia's Ngai. "She doesn't face the arrivals."