With Ted Cruz’s victory in last week's Wisconsin primary, the odds are rising that the Republican party will have a "contested" or "brokered" convention in Cleveland this summer. That presents a host of questions, not only about how such a process would work but whether it would be legitimate.

Party conventions seem to be like an appendix on the body politic, a vestigial institution that we have little use for. But the convention was once a democratic reform. The first one was held in 1831 by the Anti-Masonic party, which chose former attorney general William Wirt as its presidential nominee. Until then, presidential and vice-presidential nominations had been decided by congressional caucuses, but after the election of 1824 these appeared corrupt — a clique of insiders selecting the president candidate. The convention was a tonic to that: Party members from around the country would convene in a single place, have a wide-ranging debate, then present a nominee (and, starting in the 1840s, a platform) for the people to consider.

Like most things in American politics, conventions had a sell-by date; They themselves eventually began to look corrupt. Two nomination battles stand out. In 1912 the party regulars handed the Republican nomination to William Howard Taft instead of Theodore Roosevelt, though the latter had won an overwhelming majority of the primaries held that year. For a time, the number of convention delegates allocated by primaries was increased, but only for a while. Then, in 1968 the Democrats nominated Hubert Humphrey over Eugene McCarthy, despite the fact that Humphrey did not compete in the primaries. This created a hue and cry for reform within the Democratic party and eventually revolutionized its process. As for the Republicans, it was in 1976 that, amidst the convention fight between Ronald Reagan and Gerald Ford, delegates were bound to the results of the primaries — an innovation adopted not because it was necessarily farsighted and wise, but because it helped the Ford campaign defeat Reagan.

So, for the last 40 years, the conventions have basically been a public relations event for the two major parties, whose main speakers enjoy unfiltered access to the public via prime time network coverage.

And yet, the conventions are not quite vestigial. Neither party has ever been prepared to hand full control of its nominating process over to the voters. After internal tumult during the 1970s, the Democrats empowered so-called superdelegates — party officials and members of Congress — with an automatic vote on the convention floor, regardless of primary results. Moreover, the rule that binds Democratic delegates to the results of primaries and caucuses leaves wiggle room for the party to correct any errors its voters may have made.

Members of the Republican National Committee used to function as superdelegates, but for 2016 they are mostly bound to statewide winners. Moreover, the rules for binding delegates to primary and caucus results are pretty straightforward. So the Republican process seems more "democratic" than the Democratic process. But the Republicans have fail-safes, too — although they are indirect.

First, there is an important difference between binding delegates to a presidential candidate and selecting delegates. The binding of delegates happens via the primaries and caucuses, and that is what everybody pays attention to. But the process of selecting delegates usually happens at district and state party conventions. A common assumption is that the people selecting the national convention delegates are part of the reviled "establishment," but that is not so. These are usually not Beltway insiders, but faithful members of the grassroots, local and state party leaders, and state officials. Many have dedicated a lifetime to holding the Republican party together in their communities, through good times and bad — not necessarily because they earn a living from politics, but because they care about their party.

There was an effort in 2012 to strip the delegates of all power, via a rule giving presidential candidates authority over who shall and who shall not be a delegate, but it was voted down. This is important, because the temporary rules of the convention in Cleveland this summer invest full sovereignty in the delegates over the presidential and vice-presidential nominations, as well as the party platform. Put simply, if a majority on the convention floor really does not want to do something, that something will not be done.

This does not mean the primary and caucus results are meaningless. Far from it. And in fact 40 years' worth of quiescent conventions demonstrate the power that these contests possess— delegates are happy to defer to the wisdom of their voters. This year, it is an easy bet that if any candidate wins a solid majority of pledged delegates, he will be the nominee.

But if the primaries and caucuses produce no consensus candidate, then it is perfectly legitimate for the delegates to exercise their sovereign authority. In fact, it is essential for them to do so. Since the first party nominations— dating all the way back to the congressional caucuses in the Jeffersonian era— the mandate has been for a candidate to win a majority of the participants before he becomes the nominee, and for good reason. A party nominee is not running just as an individual, but as the representative of a coalition. If a majority of caucus members, delegates, or voters have selected somebody else, how can that nominee be said to be representative of the whole? This is the one constant amidst all the changes in the presidential nominating process from 1796 through 2016: The nominee must represent the whole party.

And it is in this way that the convention is not simply an appendix. Today, it serves a function similar to the House of Representatives whenever no presidential candidate receives an Electoral College majority: The House selects from the top three finishers, with the winner being the candidate who receives a majority of votes from the state delegations. The logic behind this rule is that the president is the government officer who represents the whole country, and if a majority of the country — acting through the Electoral College — fails to agree on a candidate, selection devolves to the House, which must continue to vote until a majority coalesces. The House has not been required to serve this function since 1824, as the people have reached agreement on their own. But the procedure is in place as a fail-safe. The same goes for the GOP nominating convention. If the Republican electorate fails to agree amongst itself, the choice devolves to the delegates.

What should we expect from such a convention? It's hard to know. The delegates have total authority over all matters under their jurisdiction. There are rules to govern their behavior, but there are enough loopholes and contradictions to effectively liberate them. And, should worse come to worst, the rules can be suspended at any time by a simple majority of the qualified delegates. The floor of the convention is thus like the floor of the House: A majority can do pretty much whatever it wants.

It is far too early to say what this may mean in practice. The delegates could very well splinter into a number of factions: those supporting one candidate; those supporting another; those who have been itching for years to bring about party reform; those who will resist such changes by every artifice available; and perhaps other factions as well. Coalitions could form and disappear in an instant, because everything is up for grabs. There could be fights over the rules and fights over the credentials of delegate slates. There could be dilatory tactics, stalking horses, and maybe even dark horses. The history of actual conventions from 1831 through 1976 — not the boring, scripted ones we have witnessed ever since — demonstrates pretty clearly that almost anything can happen.

This might make for an unfortunate spectacle on national television — and goodness knows the mainstream media will look to paint the Republican party in the most unflattering light possible. Nevertheless, there is nothing inappropriate about such an unpredictable convention. It will certainly be an unusual occurrence — but familiarity and legitimacy are not the same thing. The process may be a bit convoluted, but sometimes that is how a republican result — one that fairly represents as much of the party as possible — can be produced. Indeed, the history of party conventions suggests that sometimes the only way to reach a fair outcome is through the seemingly underhanded legerdemain of the "smoke-filled room."

So the Cleveland convention might be "contested" or "brokered," which is just another way of saying that it could be equitable, proper, and necessary for the good of the Republican party.

Jay Cost is a staff writer at The Weekly Standard and the author of A Republic No More: Big Government and the Rise of American Political Corruption.