Does the Constitution’s prohibition on religious tests for public office apply to senators confirming justices of the Supreme Court? That’s a question as President Trump mulls a successor to Anthony Kennedy.

The next justice could determine the outcome of future cases on abortion, same-sex marriage and other “social” issues animated by religion. Rarely have such questions been so hot.

They will grow incandescent if Trump names, say, Judge Amy Coney Barrett, a devout Catholic and mother of seven. She is reportedly on the short list as Trump prepares to announce his decision July 9.

When Barrett was nominated to the 7th Circuit, Democrats subjected her to an obnoxious grilling. Sen. Dianne Feinstein said Barrett gave the Democratic side “this very uncomfortable feeling.”

Religion, Feinstein fumed, has “its own dogma.” To Barrett, she said: “When you read your speeches, the conclusion one draws is that the dogma lives loudly within you, and that’s of concern.”

“Did Dianne Feinstein accuse a judicial nominee of being too Christian?” asked a Washington Post headline. So bald was Feinstein’s bias that Princeton President Christopher Eisgruber and Sen. Orrin Hatch warned that the senator was violating the most emphatic sentence in the entire US Constitution.

“No religious test,” that sentence says, “shall ever be required as a qualification to any office or public trust under the United States.”

How could the Framers possibly have made themselves more clear? “No … ever … any.”

At the time the Framers wrote that sentence, there were myriad religious tests applied to state-level offices. The Supreme Court didn’t definitively scrap the practice until 1961.

That ruling came after Maryland’s governor appointed an atheist, Roy Torcaso, to be a notary public. Torcaso refused to proclaim, as Maryland required, that he believed in God.

The Maryland court of appeals decided Torcaso’s rights weren’t violated because he wasn’t required to hold public office in the first place. The Supreme Court overturned that error unanimously.

Maryland, Justice Hugo Black wrote, had set up “a religious test” designed to “bar every person who refuses to declare a belief in God from holding a public ‘office of profit or trust’ in Maryland.”

In doing so, the Nine noted, Maryland had violated the First Amendment’s bar on Congress establishing a religion, which was incorporated against the states under the 14th Amendment.

It isn’t just Democrats who have been tempted by religious tests. When Minnesota’s Keith Ellison became the first Muslim sent to Congress, writer Dennis Prager argued he should be sworn in on the Christian Bible. In the event, Ellison was sworn in on the Koran — and, at that, a copy that once belonged to Thomas Jefferson. And now it’s the Democrats who are being tempted by religious tests.

Which brings this back to the question of whether the clause barring religious tests can be applied to the senators who will vote on Trump’s nominee.

Some columnists — Frank Bruni of the New York Times among them — are even speculating that Trump might choose Amy Barrett or another devout judge precisely to precipitate “an all-out culture war.”

The hard fact of constitutional law, though, is that only the senators can control their own behavior. They can act out of religious bias, or other bigotry, and there’s little that can be done about it.

Senators, law professor Paul Horwitz told The Washington Post, are “free to vote against a nominee for religious reasons, just as he or she is free to do so for other reasons, including racism or sexism.”

Senators may violate the spirit of the Constitution, and even the letter, but they can’t be impeached. No matter what they say in any hearing, they can’t be tried for it — or even subpoenaed — in court.

That’s because of the Constitution’s speech and debate clause. It says that for any speech or debate in the Congress, members shall not be questioned in any other place.

So the confirmation fight could be a corker.

It’s a time to remember George Washington’s famous warning — that “reason and experience both forbid us to expect that national morality can prevail in exclusion of religious principle.”