On few if any issues was there a bigger contrast between the parties in the 2020 election than on immigration. President-elect Joe Biden has made it clear that he intends to reverse Donald Trump’s highly anti-immigrant policies, including repealing his travel bans and greatly increasing the number of refugees allowed into the U.S. Race discrimination has likewise been a major focus of public debate, and Biden promises to make combatting it a major focus of his administration.

But the link between the two issues is often ignored. Exclusionary immigration policies are unjust for many of the same reasons as is racial discrimination by the state. Both restrict freedom and opportunity based on arbitrary circumstances of birth. And both have historic roots in bigotry.

Racial discrimination is a grave injustice because it penalizes people for a morally irrelevant characteristic over which they have no control. When racial segregation in the United States prevented black Americans from living where they wished, their liberty and opportunity was constrained based on an arbitrary trait determined by parentage. As Martin Luther King famously put it, people should “not be judged by the color of their skin, but by the content of their character.” This principle is also at stake in recent protests against racial profiling by law enforcement. And, of course, underlying most racial and ethnic discrimination is a history of bigotry and prejudice.

While most Americans condemn racial discrimination, it is much less widely recognized that our immigration restrictions violate the same principles. Like racial segregation, immigration law restricts where people live and work based on circumstances of birth. If you were not born a U.S. citizen, a close relative of one, or on U.S. territory, there is little chance you will ever be allowed to immigrate. For most others, the “line” they must join is virtually nonexistent.

Whether your parents were American citizens is just as much beyond your control as whether they were black or white. The same goes for whether you were born in the U.S. Neither trait says anything about the “content of your character.” In both instances, we essentially punish people for having the “wrong” parents.

Place of birth sometimes correlates with problematic characteristics. Immigrants from one country may, for example, have a higher crime rate than others, but such claims are often overblown. Immigrants actually have much lower crime rates than native-born citizens. But even if accurate, statistical generalizations about immigrant groups do not justify categorical exclusion.

Similar crude generalizations are made about different racial and ethnic groups. It does not follow, however, that we would be justified in imposing severe restrictions on those who have done nothing untoward, except belong to the “wrong” group.

Like domestic racial discrimination, immigration restrictions often arise from bigotry. Anti-Chinese racism was a key motive behind the Chinese Exclusion Act of 1882, the first major federal law restricting immigration. Prejudice against Jewish and other southern and eastern European immigrants culminated in the severely restrictive 1924 Immigration Act. Even today, prejudice against Latino immigrants plays an important role in the politics of immigration. Trump’s travel bans, which Biden plans to reverse, were the result of blatant appeals to religious prejudice against Muslims, as Trump’s own statements made clear.

Even when immigration restrictions are not motivated by prejudice, they still restrict human liberty and opportunity based on parentage and place of birth. They thereby violate the same moral principles as racial discrimination.

Immigration law does permit entry of some migrants based on education or job skills, even if they do not have U.S.-citizen relatives. But here too, there is morally arbitrary discrimination. No such qualifications are demanded of those lucky enough to be born American citizens. We would readily condemn such discrimination if Blacks, but not whites, were required to have certain credentials in order to be allowed to live in a particular area.

In many cases, immigration restrictions stifle liberty and opportunity even more than domestic racial discrimination. Many excluded migrants are consigned to a lifetime of poverty and oppression under the control of brutal regimes whose depredations go beyond those currently experienced by any American minority group.

Consider, for example, the fate of Cuban refugees forced to live under a totalitarian state, or Syrians forced to endure mass murder and terror. Many of those we deport face violence and death in their countries of origin. One of the most positive aspects of Biden’s immigration agenda is increasing the annual number of refugees admitted to the United States to 125,000 —up from the unprecedented near-total standstill on refugee admissions established by Trump. But we can and should go much further.

Biden’s plan to eliminate Trump’s travel bans barring most migration from 13 countries would diminish the unjust discrimination built into the immigration system. But, here too, there is room for much greater progress.

Not everyone agrees there should be a categorical ban on racial discrimination by government. Some conservatives who otherwise advocate color-blindness contend there should be exceptions for supposedly essential racial profiling by law enforcement. On the left, many argue that we must use racial classifications for affirmative action policies intended to compensate historically oppressed minorities for the injustices they have suffered. Both arguments are open to serious objections. But even their defenders generally recognize there should be a strong presumption against racial and ethnic discrimination that can be overcome only in exceptional cases.

Similarly, there should be a strong presumption against migration restrictions. Perhaps it can be overcome in situations where violating it is the only way to prevent some great harm. But, as with racial discrimination, a heavy burden of proof must be met before we consign people to oppression and poverty based on circumstances of birth.