Ted Cruz may have a knack for the debate stage and a disciplined, data-driven campaign, but he may also have a huge viability problem.

Cruz’s short-term dilemma has received plenty of attention: Donald Trump is on the verge of a big victory in the South Carolina Republican primary, according to most polls, and could easily capture all 50 of the Palmetto State’s delegates. And if Cruz can’t beat Trump in South Carolina — a Southern state with a large proportion of evangelical and very conservative voters, Cruz’s supposed bread and butter — what “SEC Primary” states can he win on Super Tuesday, March 1?

But Cruz also faces a longer-term, potentially more devastating math problem that has received less attention: The states that are his most natural fits — those with the highest proportions of evangelical voters — are also the least likely to award their delegates on a winner-take-all basis. In other words, Cruz’s votes may not translate into delegates nearly as efficiently as his rivals’.

An examination of the GOP delegate landscape shows that in states where evangelical Protestants are at least 30 percent of the population, just 22 percent of delegates will be awarded on a winner-take-all basis, compared to 47 percent of delegates in other states:

This delegate allocation matrix puts Cruz’s campaign at a serious disadvantage. For example, if Cruz wins the primary in his home state of Texas by one vote, he’ll probably win a handful more delegates than his nearest competitor. By contrast, if Marco Rubio or Trump win Florida by one vote, either would win a whopping 99 more delegates than his nearest competitor.

If you only count states that vote after South Carolina, the winner-take-all versus proportional gap gets even more daunting for Cruz. In fact, after South Carolina, the only winner-take-all states with a high proportion of evangelical Protestants are Indiana, Missouri and West Virginia — all of which are winner-take-all by congressional district.

These disparities could help explain why Cruz’s position in betting markets remains very anemic — a good deal behind both Trump and Rubio — even though he is doing fairly well in the polls. Cruz ranks second in the FiveThirtyEight weighted average of national polls, and the newest national NBC/Wall Street Journal survey shows him leading the GOP field for the first time at 28 percent, with 26 percent for Trump and 17 percent for Rubio.

Many pundits had initially predicted that Trump would fade, producing a Cruz-Rubio face-off for the nomination. But the cruel mathematical reality for Cruz could be hinting at a final showdown between Trump and Rubio, with Cruz and others potentially siphoning off enough delegates that neither Trump nor Rubio reach a majority of 2,472 delegates before the convention.

In fact, if Cruz’s prospects are suddenly looking dimmer, the odds of a contested convention in Cleveland may be higher than ever.

Check our our live coverage and results from the South Carolina Republican primary.