The Supreme Court’s announcement Friday that it will take up gay marriage is more than a chance for the justices to recognize the emerging national consensus in support of gay rights.

It is a chance for them to overrule the medieval views of Antonin Scalia.

As if in response to the court’s announcement, the acid-tongued justice visited Princeton University late Monday and reiterated his opinion, expressed in a 2003 dissent, that a law banning sodomy is on par with laws forbidding bestiality or murder.

“If we cannot have moral feelings against or objections to homosexuality, can we have it against anything?” Scalia said when a gay undergraduate pressed him on his views in support of anti-sodomy laws. He defended his noxious comparison: “I don’t think it’s necessary, but I think it’s effective.”

“I’m surprised you weren’t persuaded,” he told the gay student of his reductio ad absurdum comparison.

Scalia is right: His comparison is unnecessary. And he shouldn’t be surprised that Americans — including his colleagues on the court — are not persuaded.

The court’s decision to take up a pair of gay-marriage cases is almost certainly good news for gay rights and almost certainly bad news for Scalia’s defense of discrimination. Chief Justice John Roberts didn’t let his court stand in the way of immigration and Obamacare, and he surely doesn’t want to be responsible for a modern-day Plessy v. Ferguson that stands against the fast-emerging majority in support of gay rights.

A Post-ABC News poll last month found that while a slim overall majority favors legalizing gay marriage, those younger than 30 support it by 66 percent to 33 percent. Nine states and the District have now legalized gay marriage.

While few think the justices will legalize gay marriage nationwide, court watchers expect they will strike down the 1996 Defense of Marriage Act (DOMA), which trampled on states’ authority to regulate marriage. By leaving marriage up to the states, the march toward legalization will gradually continue.

This puts Nino in a tough spot. When he stood in the schoolhouse door a decade ago in his dissent in the sodomy case, he wrote: “Let me be clear that I have nothing against homosexuals, or any other group, promoting their agenda through normal democratic means. Social perceptions of sexual and other morality change over time, and every group has the right to persuade its fellow citizens that its view of such matters is the best.”

Now gay-rights supporters have done just that. If Scalia is to honor his own principle, he’ll vote to strike down DOMA and give his blessing to those states that wish to legalize gay marriage. But don’t count on it.

In writings and oral arguments of late, Scalia has sounded more like a conservative pundit than a jurist, railing against Obamacare and in support of immigration restrictions. He used his immigration dissent to criticize President Obama over a policy that didn’t figure in the case.

His 2003 dissent in the sodomy case was typical of his extra-legal logic. He accused his colleagues of signing on to “the so-called homosexual agenda” and taking “sides in the culture war” with a “massive disruption of the current social order.”

A practiced cultural warrior himself, Scalia wrote that laws “called into question” by the court striking down the sodomy ban were “laws against bigamy, same-sex marriage, adult incest, prostitution, masturbation, adultery, fornication, bestiality, and obscenity.”

Scalia said the matter should be left “to the people” rather than to a “court that is impatient of democratic change.”

A decade later, Scalia’s parade of horribles still hasn’t mustered, and support for gay marriage has spread by the very means — democratic change — that Scalia praised. If he weren’t so opposed to international experience, he’d know that gay marriage hasn’t been a major factor in places that legalized it earliest. A study of Norway and Sweden found that, after an initial flurry of interest, gay marriages are well below 1 percent of all marriages.

Scalia finds himself with a growing list of foes: public opinion, empirical evidence, his own writings and an increasing number of conservative legal thinkers. Chief Judge Dennis Jacobs of the U.S. Court of Appeals for the 2nd Circuit, a Republican appointee and a conservative, wrote in an opinion striking down DOMA that “the Constitution delegated no authority to the government of the United States on the subject of marriage.”

This would appeal to an “originalist” such as Scalia — if he weren’t more concerned with bestiality.

Twitter: @Milbank