William S. Cossen is the book review editor for H-SHGAPE (Society for Historians of the Gilded Age and Progressive Era) and is currently working on his first book, "Making Catholic America: Religious Nationalism in the Gilded Age and Progressive Era."

President Trump sparked controversy this week by wondering aloud why the U.S. admits immigrants from “shithole countries,” an attitude that, while offensive, is not un-American.  (Andrew Harrer/Bloomberg)

After reports broke on Thursday that President Trump questioned why the United States should continue welcoming immigrants from “shithole countries,” several officials were quick to condemn the remarks, with many arguing that they did not represent American values.

Trump’s comments are certainly disturbing. They also reflect, however, a long, troubling history of a nation that desires immigrants, but only the “right” sort of immigrants. Indeed, this exclusionary vision of America’s open door has been part of American policy even during the late 18th and early 19th century period celebrated as a time of unrestricted immigration. Well before the era of strict restriction — the decades of Chinese exclusion and racist quotas — the United States was already picking and choosing who could come and who could not.

This pattern extends to the very earliest days of our republic. In just its second year, the First Congress passed the Naturalization Act of 1790, which set an exclusionary tone for the country’s immigration policy, restricting naturalization and citizenship to only those immigrants classified as “a free white person.” Five years later, Congress followed up with another Naturalization Act, which reinforced the “free white person” as the standard for acceptable immigration.

As the pace of immigration from countries like Germany and Ireland quickened in the decades before the Civil War, a wave of anti-immigrant nativism swept through the country. New arrivals were attacked both because of markers of difference like their faith (many were Catholics, who some Americans feared imperiled democracy and dominant Protestant values), language and culture, and because they were regarded as economic threats to white, native-born workers.

Fears of the danger to native-born white Americans were stoked by some of the most prominent men of the age.

Presbyterian minister Lyman Beecher, the father of “Uncle Tom’s Cabin” author Harriet Beecher Stowe, argued in his 1835 “Plea for the West” that the “eruption of revolutionary Europe” into the United States had grown into “a terrific inundation.” The flood of immigrants into the country would lead, he claimed, to “multiplying tumults and violence, filling our prisons, and crowding our poorhouses, and quadrupling our taxation, and sending annually accumulating thousands to the polls to lay their inexperienced hand upon the helm of our power.”

Samuel Morse, the telegraph inventor, struck a similar nativist, conspiratorial note that same year, arguing that “the despots of Europe are attempting, by the spread of Popery in this country, to subvert its free institutions.” Morse regarded the great mass of Catholic immigrants as being unfit for American political freedoms and “too ignorant to act at all for themselves.” The continuation of this Catholic immigration, he warned, would lead to native-born Americans being dispossessed of their country.

The same concerns with whiteness and culture extended to immigration restriction even for people who, rather than crossing the border, had the border cross them. The U.S. made massive territorial gains in the Southwest after winning the Mexican-American War. Some southerners, while perhaps pleased with the new land that they envisioned as the basis for a growing slaveholding empire, saw a danger posed to the United States from the people already living on this land.

In a Senate speech on January 4, 1848, John C. Calhoun addressed the president of the Senate: “I know further, sir, that we have never dreamt of incorporating into our Union any but the Caucasian race — the free white race … Ours, sir, is the government of a white race … Are we to associate with ourselves as equals, companions, and fellow-citizens, the Indians and mixed race of Mexico? Sir, I should consider such a thing as fatal to our institutions.”

Calhoun was expressing a sentiment that harked back to the Naturalization Act of 1790: the country was made for the sole benefit of white people. A decade later, that belief served as the foundation for Chief Justice Roger B. Taney’s opinion in the 1857 Supreme Court case of Dred Scott v. Sandford, which denied African Americans the rights of citizenship.

The larger notion of the American nation being open to only the “proper” sort of people extended well beyond the Civil War. The United States experienced a massive immigration boom from the second half of the 19th century to the 1920s. Most of the new immigrants were not German and Irish, but instead represented ethnicities and nationalities previously underrepresented in the United States, including Italians, Poles, Eastern European Jews and Chinese.

Once again, exclusionary, nativist rhetoric and discrimination met these immigrants as they began settling in the country. In 1882, Congress passed the Chinese Exclusion Act, which held that “in the opinion of the Government of the United States the coming of Chinese laborers to this country endangers the good order of certain localities within the territory thereof.” For more than 60 years, that restriction would remain in place, expanding over time to include all of Asia.

Calls for more widespread immigration restriction intensified at the turn of the 20th century. Even descendants of immigrants who had previously been the targets of anti-immigration campaigns occasionally joined in the nativist rhetoric. The Irish World and American Industrial Liberator, a New York newspaper, argued in 1890, “The American people ask only that their refuse population shall not be dumped as garbage upon our shore by foreign nations nor made a species of merchandise to be trafficked in by the dealers in ‘cheap and submissive’ labor and utilized for the purpose of reducing the standard of American wages down to the European level.”

Quite the statement for a paper aimed at a population once treated as Europe’s “refuse population.”

The climax of the push for immigration restriction came in 1924, when Congress passed the Johnson-Reed Act (also known as the Immigration Act). This entrenched a quota system that restricted immigration from allegedly undesirable countries and benefited immigrants coming from the “right” sort of places — for instance, Norway. The June 2, 1925, issue of Washington, D.C.’s Evening Star reported that the country’s new immigration system had a “‘pro-Nordic’ foundation.” So, apparently, does Trump’s preferred system.

Thus, for most of American history, immigration policy was guided by fears that the “wrong” sorts of immigrants could tear the country apart, while making it harder for average Americans to make a living.

That changed, to some extent, in 1965, when Congress bowed to the ideas of justice, fairness and equality that fueled that era’s civil rights and feminist movements and unevenly began the process of moving American immigration policy away from the racist restrictions of an earlier era. New laws created a variety of programs that sought to remove the distinction between “desirable” and “undesirable” nations.

President Trump, in both rhetoric and policy, seeks to sweep aside this transformation. He stokes economic and cultural fears among his white, working-class base and proposes nativist policies that seem as if they are ripped straight from pre-1965 American immigration policy. Even his slogan, “Make America Great Again,” echoes these earlier times.

While we can argue that this push is atavistic, our history makes it very difficult to say that it is un-American.