The Constitution expressly gives Congress the power to regulate naturalization, which is the process of becoming an American citizen. It does not expressly give it the power to regulate immigration, which is the process of legally entering the country. From 1776 to 1882, Congress recognized this distinction by staying largely silent on immigration, and thus, anyone could come here from anywhere, with the only real regulation being for public health.
In 1882, Congress gave itself the power to regulate immigration,
In 1952, Congress passed the Immigration and Nationality Act (INA), which expressly authorized the president to suspend the immigration of any person, class of people or group of people into the United States for public health, public safety or national security reasons.But then he states:
Yet the courts have limited the president's exercise of this power so that he cannot base it on First Amendment-protected liberties, such as the freedoms of speech, religion and association. So he cannot bar an immigrant because of the immigrant's political views, religion or colleagues.