The United States began regulating immigration soon after it won independence from Great Britain, and the laws since enacted have reflected the politics and migrant flows of the times.

Early legislation tended to impose limits that favored Europeans, but a sweeping 1965 law opened doors to immigrants from other parts of the world.

In more recent years, laws and presidential actions have been shaped by concerns about refugees, unauthorized immigration and terrorism.
How U.S. immigration laws and rules have changed through history | Pew Research Center