The presidential primary is heating up — the 2024 Republican primary, that is.

Vice President Mike Pence would normally be the odds-on favorite. After all, he’s a loyal defender of President Trump. His social conservative bona fides are unimpeachable. And his strong ties to GOP megadonors could prove decisive in an expensive, hard-fought campaign.

But the vice president suffers from a single glaring weakness — one that potential rivals such as Josh Hawley, the freshman senator and populist wunderkind from Missouri, and Ron DeSantis, the polished, wildly popular governor of Florida, would surely exploit.

That shortcoming? A troubling track record on immigration. In the past, Pence has supported maintaining or increasing legal immigration levels. And he even sponsored a bill that would have granted amnesty to millions of illegal aliens.

Such stances are anathema in today’s Republican Party. Poll after poll shows that GOP voters care more about reducing immigration levels than any other issue — more than tax cuts, more than fighting terrorism, and more than protecting the Second Amendment and the sanctity of life.

If the vice president wants to occupy the Oval Office someday, he’ll need to win over those voters by embracing restrictionist policies.

Immigration has always been Pence’s Achilles’ heel. In 2006, then-Congressman Pence proposed giving illegal aliens a pathway to legal status. The Republican base revolted. Conservative pundits dubbed the proposal an “amnesty” and accused him of betraying the party.

The vice president also remains cozy with libertarian megadonors like Charles Koch. Koch and his late brother, David, were once applauded by conservatives for funding small-government tea party groups. But in recent years, they became personae non gratae among grassroots activists due to their support for increasing immigration levels.

Immigration restriction has become a litmus test in today’s Republican Party. A recent Harvard/Harris poll found that 59 percent of Americans who voted for Trump in 2016 consider immigration a top-three issue facing the country. By comparison, only 29 percent named health care or the economy as a top-three concern.

These voters want deep cuts to legal immigration. Seventy-nine percent of Republicans think we should admit fewer than 500,000 people annually, according to a different Harvard/Harris survey. That’s less than half the current legal influx of 1.1 million.

Pence’s GOP rivals could easily outflank him on this all-important issue.

Consider Florida’s DeSantis. The governor’s ratings took a hit over his handling of coronavirus, but DeSantis still boasts a 53-percent approval rating — thanks to his overwhelming support among Republicans and 51-percent favorability among independent voters.

It’s no mystery why the governor is so popular. He campaigned on populist, pro-worker immigration policies — and is keeping those promises. Just look at his attempts to require every Florida business to use E-Verify, the free online system that determines the legal status of newly hired laborers. Seven in 10 Floridians support mandatory E-Verify.

Such mandates have already proven successful in other states, where the populations of recently arrived undocumented aliens fell 40 percent, on average, within one year of the enactment of an E-Verify mandate.

Or consider Senator Tom Cotton, the hawkish populist from Arkansas. In 2017 and then again in 2019, he introduced the Raise Act — a bill that would cut legal immigration in half — to safeguard the jobs of blue-collar Americans, the ones who “take a shower after they get off work, not before they go to work.”

The Raise Act is enormously popular with Republican voters — nearly three in four support it, according to a Politico/Morning Consult poll. Cotton’s pro-American-worker message is so popular that Democrats aren’t even bothering to field a candidate against him this fall.

Missouri’s Hawley has also championed immigration restrictions. He has co-sponsored the Raise Act, denounced amnesty for illegal aliens, and opposed unnecessary worker visas.

Pence could safeguard his right flank in a 2024 primary by forcefully advocating for less immigration. That would also allow him to counter Nikki Haley, an unabashed globalist who has argued that “we need as many immigrants as we can [get]”  — a stance that pleases libertarian megadonors but sparks revulsion among the GOP base.

Pence looks like a president. He sounds like a president. And he’s got a stellar conservative record — with just one exception.

To punch his ticket to the Oval Office in 2024, evangelical voters will need to get religion on mass immigration — that’s very unlikely.