America's self-image has long been that of a melting pot -- a refuge for the "huddled masses yearning to breathe free" and "a nation built by immigrants." The country's history is also replete with examples of shutting the door on arrivals from places like China, Eastern and Southern Europe, and more recently, from predominantly Muslim nations. In other words, America's relationship with immigration is complicated.
Pictured: An Italian family looking for lost baggage, Ellis Island, c. 1904-1926
Lewis Hines/The New York Public Library
Immigrants await processing in the main hall of the U.S. Immigration Station at Ellis Island, c. 1902-1913. Ellis Island in New York Harbor was the nation's gateway for millions of immigrants. Approximately 12 million people passed through between 1892 and 1954, with three-quarters of them arriving between 1892 and 1924.
The New York Public Library
The leaders of colonial America knew they needed immigrants to populate their new land, but even then 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.
Pictured: Immigrants undergoing a medical examination at Ellis Island, c.1902-1913.
Edwin Levick/The New York Public Library
In the 1840s and '50s, a rise in German and Irish immigration, as well as fears that Catholic newcomers were loyal to a foreign entity -- the pope -- and incompatible with American values, spurred a nativist and populist movement, known as the Know Nothings.
Pictured: Sadie O'Connell, a typical Irish immigrant, lands in Boston, 1920s.
For the masses of immigrants who passed through Ellis Island, the Statue of Liberty served as a beacon of welcome and a symbol of freedom. America was seen as the land of opportunity.
Pictured: Mr. and Mrs. Paul Roerich from Bavaria, Germany, look out from the stern of the USNS General Langfitt anchored in New York Harbor carrying 1,267 refugees from Europe, Oct. 28, 1956. The couple planned to settle in Ohio.
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.
Chinese immigrants in California were instrumental in building the Transcontinental Railroad and shouldered much of the work building the West in the late 19th and early 20th centuries.
George Rinhart/Corbis via Getty Images
Chinese-Americans on Mott and Pell Streets in New York's Chinatown celebrate the Japanese surrender on V-J Day, Aug. 14, 1945.
Today, Chinese immigrants are the third largest foreign-born group in the U.S., following Mexicans and Indians, numbering more than two million, according to the Migration Policy Institute.
Tom Fitzsimmons/AP Photo
Albert Einstein, a German-born Jewish physicist best known for his formula E= mc2, was targeted by the Nazis after Adolf Hitler came to power. He left Germany in 1933, settled in the U.S. and eventually became a citizen in 1940. <br><br>The U.S. has long benefited from the intellectual and scientific achievements of immigrants.
Corbis via Getty Images
Jewish refugees from Europe were blocked during and after World War II. <br> <br>In a well-publicized case in 1939, the U.S. denied entry to over 900 Jewish refugees who had sailed on the St. Louis, seen here, from Hamburg, Germany, after Cuba refused them entry. The ship returned to Europe and 254 passengers are known to have died in the Holocaust, according to the U.S. Holocaust Memorial Museum.
At the height of war hysteria in 1942, President Franklin Roosevelt issued Executive Order 9066 allowing for the removal and imprisonment in 10 internment camps of more than 110,000 Americans of Japanese descent during World War II. Still, 30,000 Japanese-Americans fought for the U.S. in the war.
Pictured: Mr. and Mrs. Henry J. Tsurutani and their child, Bruce, in their home at the Manzanar Relocation Center in California, 1943.
Ansel Adams/Library of Congress
Three Finnish children write "America" on a chalkboard in a class held for immigrant children detained at Ellis Island in New York City, April 7, 1949.
Bill Vetesy of Colonia, New Jersey, holds a picture of his mother and brother as he asks a military police officer inside the fence at Camp Kilmer, New Jersey, if they are among the 60 Hungarian refugees who arrived at the camp, Nov. 21, 1951.
U.S. Border Patrol agents Fred H. Voight, (L), and Gordon MacDonald, (R), both from the El Centro U.S. Border Patrol sector headquarters, search two Mexican nationals, Pedro Vidal and Canuto Garcia, shortly after the two men illegally crossed the border from Mexico, west of Calexico, California, Aug. 11, 1951.
A group of 208 White Russians pose for a picture taken by Countess Alexandra L. Tolstoy (L), daughter of Leo Tolstoy and president of the Tolstoy Foundation which sponsored their resettlement in Bridgeton, New Jersey, June 6, 1963. White Russians originally fled the Soviet Union in the 1920s in the wake of the Russian Revolution after opposing the Bolsheviks.
Dade county police in riot gear push back a crowd of several hundred Haitian demonstrators outside the Krome Avenue detention camp, Dec. 17, 1981, in Miami. The protesters were showing solidarity with Haitian hunger strikers inside the camp. The prison, located west of Miami, was called the "Caribbean Ellis Island" and housed people apprehended trying to enter the U.S.
Bettmann Archive/Getty Images
U.S. Border Patrol officer Ed Pyeatt, on horseback, leads a group of undocumented immigrants down the hillside toward waiting vans for the trip to a holding center at the Chula Vista, California border station, Aug. 18, 1981.
Mexican farm workers, Jose Duenas-Lopez,Jose Santillano, Carlo Castro-Gutierres and Alejandro Fierro (L-R), sit under a poster of the Statue of Liberty at the U.S. Immigration and Naturalization Service office in Denver, Nov. 11, 1987. The four were waiting to begin the application process for amnesty under the landmark Immigration Control and Reform Act of 1986, which required employers to attest to the immigration status of employees, legalized some illegal immigrants and created a pilot visa waiver program.
The U.S. is 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 100 years earlier, when the population was less than a third of what it is now. While the country continues to be seen as a land of opportunity there are questions as to how open the door is to immigrants today.
Santiago Lyon/AP Photos
As hard as it often was - and as much bigotry as immigrants endured - immigration is central to the American narrative." It's fundamental," said William Thiesen, 37, a New Yorker visiting the city's Tenement Museum, Jan. 31, 2017. "I think being an American is being an immigrant. It's the American fabric. We're all immigrants."
Pictured: People from approximately 100 different countries wave flags at a citizenship ceremony, Feb. 21, 2008, in Los Angeles.
Robyn Beck/AFP/Getty Images