The Trump administration recently proposed to massively expand something called “expedited removal,” which allows immigration agents to shunt people more easily into deportation proceedings without due process or review. The policy would give individual agents enormous power over immigrants anywhere in the country, particularly undocumented immigrants who have lived in the United States for less than two years.

Supporters of the president’s immigration policies welcome this change because they think it targets undocumented immigrants, or “illegal aliens,” who they believe have no right to stay in the United States. Many who subscribe to this view are themselves descended from European immigrants. And in making their argument against undocumented immigrants, they emphasize that their European ancestors came legally and respected the law — in contrast to today’s immigrants. But they have gotten the history wrong, especially if their ancestors arrived in the United States during the 19th century.

This view of the past is shaped by two misconceptions: that Europeans who were admitted in the 19th century were “legal” and that unauthorized entry is a new problem caused by contemporary immigration, especially from Latin America. This misguided history has contributed to the vilification of today’s Latinx immigrants — resulting in such extreme enforcement policies as expedited removal, family separation and indefinite detention.

In reality, European immigrants in the 19th century were probably not as legal as their descendants think they were.

Contrary to the common myth that there was no immigration law in the 19th-century United States and that the country had open borders before Congress began restricting Chinese immigration during the 1870s and 1880s, U.S. borders were never legally open — even before federal Chinese exclusion. Before the federal government started regulating immigration, municipal and state governments administered immigrant admission and exclusion. In other words, immigration control operated at the local and state levels.

In the Colonial period, the British introduced to the American colonies their home country’s “poor laws,” which regulated the movement of the transient poor. After American independence, state governments built upon these poor laws to develop measures to restrict destitute immigrants and those appearing “likely to become public charges” from arriving and settling in particular states.

An 1848 Massachusetts law banned the landing of “lunatic, idiot, maimed, aged, or infirm persons, incompetent … to maintain themselves” or paupers unless the shipmaster provided bonds for such passengers. The bonds would cover the expense of supporting the immigrants if they became public charges. At the same time, the bonding system also aimed to shift the onus to ship operators to support needy immigrants, pressuring them into bringing undesirable foreigners back to their places of embarkation.

Massachusetts also developed particular laws for deporting destitute foreigners already resident in the United States back to their countries of origin. Immigration officials in Massachusetts were authorized to expel any foreign pauper to “any place beyond [the] sea, where he belongs.” It was a predecessor to the power of expedited removal.

We can see through these laws that European immigrants to antebellum America could be refused entry and deported under state immigration laws. But how about those who were admitted? Did their admission mean that they entered the country legally?

No. Despite state laws that restricted the immigration of the poor, many impoverished Europeans ended up securing admission into the United States without the bonds required by the law. Public almshouses in eastern cities, such as New York and Boston, continued to have a large and growing number of foreign-born — especially Irish — residents. During the 1850s, New Yorkers witnessed groups of destitute Irish immigrants “in an almost naked and famishing state, in Broadway, begging the charity of the passers.”

State immigration laws were precisely designed to restrict the landing of these people. How did they enter the country and evade deportation?

One explanation is that the scale of immigration was simply too large for local and state officials to strictly enforce the pauper exclusion provisions of the immigration law. Between 1846 and 1855, about 1.5 million Irish men and women fled famine-stricken Ireland, migrating to the United States. This rapid migration of very impoverished immigrants overwhelmed the operation of state-level immigration control, allowing people to enter the United States without proper inspection and bonds.

Legal and public pressure grew in response. A nativist newspaper in Boston claimed that indigent foreigners “should be sent back at once,” emphasizing the importance of enforcing the immigration law, “the end of which will be to keep the paupers of foreign countries at home, where only they can belong.” In his 1848 report, the Superintendent of Alien Passengers in Boston had to expressly emphasize that “bonds have been required” for the landing of destitute immigrants, in response to the criticism that they had been freely landed without bonds in breach of the law.

The situation was similar in the case of deportation. In Massachusetts, state law technically made all foreigners accommodated at public almshouses deportable. State officials constantly expelled Irish paupers, sometimes in extremely aggressive and inhumane ways that foreshadowed the activities of U.S. Immigration and Customs Enforcement today, such as family separation and citizen deportation. Nevertheless, the overall scale of law enforcement remained unsatisfactory to nativists who demanded that “all laws [be] properly executed.”

In the end, most deportable foreigners were able to stay in the United States, because the state did not have the capacity to remove all of them. These immigrants received virtual amnesty and settled in the country as permanent members of U.S. society.

Compassion also played a role. A port official in Boston was charged by the Massachusetts legislature for admitting destitute foreigners without implementing the state immigration law. He defended his behavior by stating that “if you were to see them dying and suffering, as I do, on their arrival, I doubt whether you could deny them the privilege of landing.” Public officials’ willful decision not to enforce the law infuriated nativists, who deplored: “poor as our laws have been on this subject, we have not even had officers, with patriotism to execute them.”

Many European immigrants in the 19th century entered and stayed in the United States, not because there was no immigration law prohibiting their admission, not because they followed the law, but because officials simply let them in. Whether it was because of inability or unwillingness, the officials’ nonenforcement of the law significantly helped the newcomers’ entry.

Without federal laws that categorically excluded Europeans like those that excluded the Chinese, Europeans had an easier time entering the United States. But even when states administered immigration control, Europeans landed anyway, often expressly against state laws.

The contrast touted today between past European lawfulness and present Latinx “illegality” is artificial and based on partial, mistaken interpretations of U.S. immigration history. Many Americans claiming European immigrant heritage have forgotten that if the laws had been harshly enforced in the 19th century, their own ancestors might not have been allowed to enter and stay. They should stop disparaging and dehumanizing Latinx immigrants — and encouraging inhumane immigration enforcement — by glamorizing their kinsmen.