Parts of Donald Trump’s immigration plan may raise serious constitutional questions, but the part that launched a media firestorm—ending birthright citizenship for the children of illegal aliens—does not.

The Constitution’s Fourteenth Amendment does not confer citizenship on the children of foreigners, whether legal or illegal.

Media commentators have gotten this issue dead wrong. Fox News’s Judge Andrew Napolitano says the Fourteenth Amendment is “very clear” that its Citizenship Clause commands that any child born in America is automatically an American citizen.

That’s not the law. It has never been the law.

Under current immigration law—found at 8 U.S.C. § 1401(a)—a baby born on American soil to a (1) foreign ambassador, (2) head of state, or (3) foreign military prisoner is not an American citizen.

How is that possible? This is from the Immigration and Nationality Act of 1952 (INA), as it has been amended over the years. Is this federal law unconstitutional?

No. The Citizenship Clause of the Fourteenth Amendment provides: “All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside.” Today’s debate turns on the six words, “and subject to the jurisdiction thereof.”

As captured in the movie Lincoln, the Thirteenth Amendment—which ended slavery—barely passed Congress because many Democrats supported slavery, and it was only through the political genius and resolve of Republican President Abraham Lincoln that the proposed amendment passed Congress in 1865, sending it to the states for ratification.

In 1866, Congress passed a Civil Rights Act to guarantee black Americans their constitutional rights as citizens, claiming that the Constitution’s Thirteenth Amendment gave Congress the power to pass such laws. But many voted against the Civil Rights Act because they thought it exceeded Congress’s powers, and even many of its supporters doubted its legality.

The Civil Rights Act included a definition for national citizenship, to guarantee that former slaves would forever be free of the infamous Dred Scott decision which declared black people were not American citizens. That provision read, “All persons born in the United States, and not subject to any foreign power, excluding Indians not taxed, are hereby declared to be citizens of the United States.”

That was the original meaning of the jurisdiction language in the Fourteenth Amendment. A person who is “subject to the jurisdiction” of the United States is a person who is “not subject to any foreign power”—that is, a person who was entirely native to the United States, not the citizen or subject of any foreign government. The same members of Congress who voted for the Thirteenth Amendment in 1865 then voted to define citizenship for freed slaves in a federal law in 1866, then voted again months later in 1866—using only slightly different language—to put that definition of citizenship in the Constitution, language that was ultimately ratified by the states in 1868 as the Fourteenth Amendment.

In 1884, the Supreme Court in Elk v. Wilkins noted that the language of the Civil Rights Act was condensed and rephrased in the Fourteenth Amendment and that courts can therefore look to the Civil Rights Act to understand better the meaning of the Fourteenth Amendment. The Court reasoned that if a person is a foreign citizen, then their children are likewise not constitutionally under the jurisdiction of the United States, and therefore not entitled to citizenship. In fact, the Court specifically then added that this rule is why the children of foreign ambassadors are not American citizens.

That is why Congress can specify that the children of foreign diplomats and foreign soldiers are not Americans by birth. They’re not “subject to the jurisdiction” of the United States. Congress’s INA does not grant them citizenship; federal law never has.

So why is a child born on American soil to foreign parents an American citizen by birth? Because the Fourteenth Amendment’s Citizenship Clause is a floor, not a ceiling. Under Article I, Section 8, Clause 4 of the Constitution, Congress has absolute power to make laws for immigration and for granting citizenship to foreigners. Congress’s current INA is far more generous than the Constitution requires. Congress could expand it to grant citizenship to every human being on earth, or narrow it to its constitutional minimum.

Media confusion on this issue is puzzling, because the greatest legal minds in this country have discussed the issue. (Just none of them were put on camera to explain it.) Scholars including Dr. John Eastman of Chapman University, and even Attorney General Edwin Meese—the godfather of constitutional conservatism in the law—reject the myth of birthright citizenship.

Nor is rejection of birthright citizenship limited to conservatives. Judge Richard Posner—a prolific scholar who, despite being appointed by Ronald Reagan, is a liberal judicial activist—wrote in 2003 in Ofoji v. Ashcroft:

We should not be encouraging foreigners to come to the United States solely to enable them to confer U.S. citizenship on their future children. But the way to stop that abuse of hospitality is to remove the incentive by changing the rule on citizenship…. A constitutional amendment may be required to change the rule whereby birth in this country automatically confers U.S. citizenship, but I doubt it…. The purpose of the rule was to grant citizenship to the recently freed slaves, and the exception for children of foreign diplomats and heads of state shows that Congress did not read the citizenship clause of the Fourteenth Amendment literally. Congress would not be flouting the Constitution if it amended the Immigration and Nationality Act to put an end to the nonsense.

It is another question as to whether Congress could strip citizenship from the children of illegals who already have it. If Congress could do that, then it could also strip citizenship from the many millions of foreigners who came to the United States legally and went through the lawful process to become Americans. There is no court precedent for that, and the congressional and ratification debates from the Fourteenth Amendment do not reveal a clear answer.

Trump could rescind President Barack Obama’s executive amnesty, but that executive order did not grant anyone citizenship, and it would be a steep uphill climb in court to try to take someone’s citizenship away. And if the children already here are American citizens, then they could never be deported.

Some other parts of Trump’s plan face even longer odds. The Due Process Clause of the Fifth Amendment to the Bill of Rights applies to all “persons,” not just citizens. And the courts have always held that due process requires any foreigner to be given a “meaningful hearing” in court before being deported. That would certainly impact the pace of deportation.

Donald Trump’s position on immigration has changed drastically from his previous positions, just like his past support for socialized healthcare and abortion. He has not yet explained why he changed his position on immigration, and some voters do not trust that he sincerely holds to his current campaign positions.

But none of that changes the legality of his immigration proposal. While parts of it may face legal challenges, denying citizenship to the children of illegal aliens is fully consistent with the Constitution’s Fourteenth Amendment.

Ken Klukowski is legal editor of Breitbart News and a practicing constitutional attorney, and explains birthright citizenship in Chapter 12 of Resurgent: How Constitutional Conservatism Can Save America. Follow him on Twitter @kenklukowski.