Having mastered fake news, now the media are trying out a little fake history.

In the news business, new topics are always popping up, from the Logan Act and the emoluments clause to North Korea. The all-star panels rush to Wikipedia, so they can pretend to be experts on things they knew nothing about an hour earlier.

Such is the case today with “anchor babies” and “birthright citizenship.” People who know zilch about the history of the 14th Amendment are pontificating magnificently and completely falsely on the issue du jour.

If you’d like to be the smartest person at your next cocktail party by knowing the truth about the 14th Amendment, this is the column for you!

Of course the president can end the citizenship of “anchor babies” by executive order — for the simple reason that no Supreme Court or U.S. Congress has ever conferred such a right.

It’s just something everyone believes to be true.

How could anyone — even a not-very-bright person — imagine that granting citizenship to the children of illegal aliens is actually in our Constitution?

The first question would be: Why would they do that? It’s like being accused of robbing a homeless person. WHY WOULD I?

The Supreme Court has stated — repeatedly! — that the “main object” of the citizenship clause of the 14th Amendment “was to settle the question … as to the citizenship of free negroes,” making them “citizens of the United States and of the state in which they reside.”

Democrats, the entire media and House Speaker Paul Ryan seem to have forgotten the Civil War. They believe that, immediately after a war that ended slavery, Americans rose up as one and demanded that the children of illegals be granted citizenship!

You know what’s really bothering me? If someone comes into the country illegally and has a kid, that kid should be an American citizen!

YOU MEAN THAT’S NOT ALREADY IN THE CONSTITUTION?

Give me a scenario — just one scenario — where the post-Civil War amendments would be intended to grant citizenship to the kids of Chinese ladies flying to birthing hospitals in California, or pregnant Latin Americans sneaking across the border in the back of flatbed trucks.

You can make it up. It doesn’t have to be a true scenario. Any scenario!

As the court has explained again and again and again:

“(N)o one can fail to be impressed with the one pervading purpose found in (the 13th, 14th and 15th) amendments, lying at the foundation of each, and without which none of them would have been even suggested; we mean the freedom of the slave race, the security and firm establishment of that freedom, and the protection of the newly made freeman and citizen from the oppressions of those who had formerly exercised unlimited dominion over him.”

That’s why the amendment refers to people who are “subject to the jurisdiction” of the United States “and of the state wherein they reside.” For generations, African-Americans were domiciled in this country. The only reason they weren’t citizens was because of slavery, which the country had just fought a civil war to end.

The 14th Amendment fixed that.

The amendment didn’t even make Indians citizens. Why? Because it was about freed slaves. Sixteen years after the 14th Amendment was ratified, the Supreme Court held that an American Indian, John Elk, was not a citizen, despite having been born here.

Instead, Congress had to pass a separate law making Indians citizens, which it did, more than half a century after the adoption of the 14th Amendment. (It’s easy to miss — the law is titled: “THE INDIAN CITIZENSHIP ACT OF 1924.”) Why would such a law be necessary if simply being born in the U.S. was enough to confer citizenship?

Even today, the children of diplomats and foreign ministers are not granted citizenship on the basis of being born here.

President Trump, unlike his critics, honors black history by recognizing that the whole purpose of the Civil War amendments was to guarantee the rights of freed slaves.

But the left has always been bored with black people. If they start gassing on about “civil rights,” you can be sure it will be about transgenders, the abortion ladies or illegal aliens. Liberals can never seem to remember the people whose ancestors were brought here as slaves, i.e., the only reason we even have civil rights laws.

Still, it requires breathtaking audacity to use the Civil War amendments to bring in cheap foreign labor, which drives down the wages of African-Americans — the very people the amendments were written to protect!

Whether the children born to legal immigrants are citizens is controversial enough. But at least there’s a Supreme Court decision claiming that they are — U.S. v. Wong Kim Ark. That’s “birthright citizenship.”

It’s something else entirely to claim that an illegal alien, subject to deportation, can drop a baby and suddenly claim to be the parent of a “citizen.”

This crackpot notion was concocted by liberal zealot Justice William Brennan and slipped into a footnote as dicta in a 1982 case. “Dicta” means it was not the ruling of the court, just a random aside, with zero legal significance.

Left-wing activists seized on Brennan’s aside and browbeat everyone into believing that anchor babies are part of our great constitutional heritage, emerging straight from the pen of James Madison.

No Supreme Court has ever held that children born to illegal aliens are citizens. No Congress has deliberated and decided to grant that right. It’s a made-up right, grounded only in the smoke and mirrors around Justice Brennan’s 1982 footnote.

Obviously, it would be better if Congress passed a law clearly stating that children born to illegals are not citizens. (Trump won’t be president forever!) But until that happens, the president of the United States is not required to continue a ridiculous practice that has absolutely no basis in law.

It’s often said that journalism is the first draft of history. As we now we see, fake news is the first draft of fake history.