President Donald Trump’s announcement Tuesday that he is preparing an executive order to end birthright citizenship has the left and even some conservatives in an uproar.

But the president is correct when he says that the 14th Amendment to the Constitution does not require universal birthright citizenship.

An executive order by Trump ending birthright citizenship would face a certain court challenge that would wind up in the Supreme Court. But based on my research of this issue over several years, I believe the president’s view is consistent with the view of the framers of the amendment.

Those who claim the 14th Amendment mandates that anyone born in the U.S. is automatically an American citizen are misinterpreting the amendment in a manner inconsistent with the intent of the amendment’s framers.

Universal birthright citizenship attracts illegal immigration. By granting immediate citizenship to anyone born on U.S. soil, regardless of the legal status of the parents, we reward and encourage illegal and exploitative immigration.

Most countries around the world do not provide birthright citizenship. We do so based not upon the requirements of federal law or the Constitution, but based upon an erroneous executive interpretation. That should be changed.

Many Republicans, Democrats, and independents believe the 14th Amendment grants citizenship to anyone born on U.S. soil, even if their parents are here illegally. But that ignores the text and legislative history of the amendment, which was ratified in 1868 to extend citizenship to freed slaves and their children.

Contrary to popular belief, the 14th Amendment doesn’t say that all people born in the U.S. are citizens. It says that “all persons born or naturalized in the United States and subject to the jurisdiction thereof” are citizens. That second, critical, conditional phrase is conveniently ignored or misinterpreted by advocates of “birthright” citizenship.

Critics of the president’s possible action erroneously claim that anyone present in the United States has “subjected” himself or herself “to the jurisdiction” of the United States, which would extend citizenship to the children of tourists, diplomats, and illegal immigrants alike.

But that is not what that qualifying phrase means. Its original meaning refers to the political allegiance of an individual and the jurisdiction that a foreign government has over that individual.

The fact that tourists or illegal immigrants are subject to our laws and our courts if they violate our laws means that they are subject to the territorial jurisdiction of the U.S. and can be prosecuted. But it does not place them within the political “jurisdiction” of the United States, as that phrase was defined by the framers of the 14th Amendment.

This amendment’s language was derived from the 1866 Civil Rights Act, which provided that “all persons born in the United States, and not subject to any foreign power,” would be considered citizens.

The amendment was intended to give citizenship only to those who owed their allegiance to the United States and were subject to its complete jurisdiction. Sen. Lyman Trumbull, R-Ill., a key figure in the adoption of the 14th Amendment, said that “subject to the jurisdiction” meant not owing allegiance to any other country.

Universal birthright citizenship attracts illegal immigration. By granting immediate citizenship to anyone born on U.S. soil, regardless of the legal status of the parents, we reward and encourage illegal and exploitative immigration.

Today many people do not seem to understand the distinction between partial, territorial jurisdiction—which subjects all foreigners who enter the U.S. to the jurisdiction of our laws—and complete political jurisdiction, which requires allegiance to the U.S. government as well.

So while a foreign tourist could be prosecuted for violating a criminal statute, he could not be drafted if we had a military draft or otherwise be subject to other requirements imposed on citizens, such as serving on a jury. If a foreign tourist has a baby while in the U.S., her child is a citizen of her home country and owes no political allegiance to the U.S.

In the famous Slaughter-House cases of 1872, the Supreme Court stated that this qualifying phrase was intended to exclude “children of ministers, consuls, and citizens or subjects of foreign States born within the United States.”

This was confirmed in 1884 in another case, Elk vs. Wilkins, when citizenship was denied to an American Indian because he “owed immediate allegiance to” his tribe and not the United States.

American Indians and their children did not become citizens until Congress passed the Indian Citizenship Act of 1924. There would have been no need to pass such legislation if the 14th Amendment extended citizenship to all people born in America, no matter what the circumstances of their birth, and no matter the legal status of their parents.

Most legal arguments for universal birthright citizenship point to the Supreme Court’s 1898 decision in United States v. Wong Kim Ark. But that decision only stands for the very narrow proposition that children born of lawful, permanent residents are U.S. citizens.

The high court decision says nothing about the children of illegal immigrants or the children of tourists, students, and other foreigners only temporarily present in this country being automatically considered U.S. citizens. Those children are considered citizens of the native countries of their parents, just like children born abroad to American parents are considered U.S. citizens, no matter where the children are born.

The Supreme Court’s interpretation of the 14th Amendment as extending to the children of legal noncitizens was incorrect, according to the text and legislative history of the amendment. But even under that holding, citizenship was not extended to the children of illegal immigrants—only permanent, legal residents.

U.S. immigration law (8 U.S.C. § 1401) simply repeats the language of the 14th Amendment, including the phrase “subject to the jurisdiction thereof.” The federal government has erroneously interpreted that statute to provide passports and other benefits to anyone born in the United States, regardless of whether their parents are here illegally and regardless of whether the applicant meets the requirement of being “subject to the jurisdiction” of the U.S.

As a result, the president of the United States has the authority to direct federal agencies to act in accordance with the original meaning of the 14th Amendment, and to issue passports and other government documents and benefits only to those individuals whose status as U.S. citizens meets this requirement.