As the Republican presidential primary race rolls on, many are speculating about its conclusion. One possibility is a brokered convention, which will happen if no candidate wins a majority of delegates in the primaries. That’s 1,237 delegates out of 2,472 total, for those keeping score.

A quick recap as it stands today: Donald Trump leads the field with 459 (44%) and Ted Cruz is close behind with 364 (35%). Marco Rubio at 153 (15%) and John Kasich at 54 (5%) trail badly, and both can only hope for a brokered convention, though how they’d win one is hard to imagine without a major change in momentum. But 1,442 delegates remain up for grabs, so maybe anything can happen.

The immediate question for Rubio and Kasich is whether they can even win their home states — Florida and Ohio, respectively — on Tuesday. If they can’t, there’s almost no justification for remaining in the race. And with Rubio in particular, his precipitous and arguably deserved slide has some arguing that he’s just hurting Cruz in other states by sticking around. Cruz can’t win winner-take-all Florida, and it’s increasingly likely that Rubio won’t either, which means those 99 delegates will go to Trump. And Rubio will detract from Cruz in the proportional states of Missouri, Illinois and North Carolina.

If we had our druthers, both Rubio and Kasich would bow out now and let the chips fall where they may in a Trump-Cruz race.

So back to the brokered convention. Let’s say that no matter who remains in the race, no one reaches the required majority of 1,237 delegates for a clear victory and the nomination. What then?

Well, Trump and his supporters are arguing that if he’s leading at the end and doesn’t get the nomination, it will have been “stolen” from him, thereby “disenfranchising” millions of voters. It’s certainly understandable that they would think so, especially given that Trump always talks about “winning” and leading all the polls (though for some reason he neglects to mention the polls against Hillary Clinton, which all show him losing to her). But rules are rules.

As The Wall Street Journal summed up, “The Republican Party’s rules say a candidate needs the votes of 1,237 of the 2,472 delegates at the July convention in Cleveland to win the nomination. They don’t say all one needs is a plurality, or to have won the most primaries. There is no moral right to the nomination because a candidate wins 40%, or even 49%, of the delegates. He needs a majority, and the 1,237 number is no secret.”

Political writer Mona Charen adds, “Preventing a candidate from amassing a majority of delegates by suggesting they vote for others is not illegitimate. And if the strategy works and Trump arrives at the convention with less than a majority, by what logic can it be called stealing if he then fails to get the nomination? It hasn’t happened that way in a very long time, but those are the rules.”

The modern primary system didn’t really become established until after World War II, but it has rarely yielded a convention fight for the nomination. The last such fight for Republicans was in 1976, when Ronald Reagan challenged and lost to incumbent President Gerald Ford, who came into the convention with the lead. But Reagan didn’t take his voters and run third-party; he supported Ford — who lost the election to Jimmy Carter. Draw from that whatever lessons you will.

In any case, Trump could win a contested convention. On the first ballot, 1,700 delegates are bound to vote for the candidate to whom they’re pledged. After that, 80% become free to vote their own choice, and it increases on the third ballot and following. If Trump has 1,200 delegates coming in, it’s not at all a stretch to say the prevailing sentiment won’t be exactly that propounded by the Trump campaign: “Our guy won the most states and delegates, so he should get the nomination.” And maybe Trump will negotiate one of those great deals he’s always telling us about.

There are mitigating factors, of course. If Trump shows up with 1,100 delegates and Cruz has 1,050, it will change the calculation in a brokered convention. Or let’s say there actually is something bad in Trump’s tax returns or another scandal from his past comes to light. Shouldn’t that factor into the nominating process?

A final note: In a sense, a contested convention would upend the prevailing political system, which is the entire justification for Trump’s candidacy. It would be no small irony if that upending cost Trump the nomination.