After Ted Cruz won every delegate up for grabs at the Colorado Republican convention, Donald Trump began complaining that the process at such conventions is unfair. His claim is that party insiders should not be making these choices, but rather that the power should be vested with the voters. As a consequence, Cruz is “stealing" delegates from Trump, and in so doing defying the will of the voters.

Trump's accusations are specious and disingenuous. The process that has been playing out is perfectly legitimate. Trump's real problem is that he is being outhustled by the Cruz campaign.

The Republican nomination process operates along two tracks. The first—which garners most of the attention—is the binding of convention delegates to a presidential candidate, through primaries and caucuses. When one sees news reports that Trump has 743 delegates, Cruz has 545 delegates, and Kasich has 143 delegates, these are the number of delegates obliged by the party rules to vote for that candidate on the presidential ballot in Cleveland.

But only a handful of the actual delegates have been selected so far. That is the second track, and it happens in three ways. Some delegates are directly chosen by the candidates, and others are directly voted upon by primary voters. But the overwhelming majority are selected by the party organizations in the states and territories, through a series of party conventions, usually held at the congressional district and state levels. In a few cases—Colorado, Wyoming, and some of the territories—these conventions are also tasked with binding the delegates. But most party conventions simply pick the people who will be delegates in Cleveland, leaving the task of binding to the voters in the primaries and caucuses.

Trump has been complaining that all of these conventions are unfair because his kneejerk reaction is to whine about anything that does not go his way. These conventions present two problems for him. In Colorado and Wyoming, Trump lost out on opportunities to win delegates pledged to him (i.e., the first track). But in other convention battles—for instance in Iowa, North Carolina, and Virginia—his problem has to do with the second track, in particular the growing number of Trojan horse delegates.

These Trojan horse delegates are obliged by party rules to vote for Trump on the presidential ballot, but they are otherwise loyal to Cruz. Just because they are required to vote for Trump for the presidential nomination does not mean they need to back him on other matters before the convention. Trojan horse delegates are free to vote with Cruz on disputes over rules or delegate credentials. They can also support Cruz on matters presented to the convention floor. All of that is important, as Cruz will undoubtedly try to tweak the convention rules to make it more difficult for anybody else to win the nomination. Crucially, the bulk of convention delegates are only bound to presidential candidates for a specified number of ballots. By a fourth or fifth ballot, almost all of them would be free to vote for whomever they prefer. Delegates loyal to Cruz but bound temporarily to Trump could ultimately deliver the nomination to the Texas senator.

Naturally, Trump thinks this is grossly unfair. This is nonsense. Nobody changed the party rules in the middle of this process, and nobody fed the Cruz campaign inside information that was not available to the Trump team. The rules have been a matter of public record all along. The Cruz campaign took the time to understand them and use them to its advantage.

Party conventions are open processes. Delegates to these gatherings are not handpicked by party bosses. They are regular Republicans who participate because they have the time and interest to do so. The Cruz team put in the effort to organize regulars loyal to its candidate; the Trump campaign failed to do so. Consider, for instance, the Colorado convention held earlier this month. Delegates to that convention were chosen at precinct caucuses held on Super Tuesday—and any registered Republican was invited to attend. That the Trump campaign failed to get its supporters to those caucuses is not the fault of the Cruz campaign, the Colorado Republican party, or anybody else except the Trump campaign.

The Republican party does not belong to its presidential candidates in the way that Trump presumes. In important respects, it still belongs to the party regulars who attend these conventions. Starting in the 1970s, the party organization began sharing authority with voters to select the presidential nominee, but sovereignty was never handed over to the electorate lock, stock, and barrel. The delegates to the national convention, chosen mostly by these state and district conventions, have always retained a role—not only to act when the voters fail to reach a consensus, but to conduct regular party business.

This is hardly antidemocratic, by the way. Party organizations such as these are a vital, albeit overlooked part of our nation's democratic machinery. The party regulars at the district, state, and national conventions do the quotidian work of holding the party together between elections: They establish its rules, arbitrate disputes, formulate platforms to present to the voters, and so on. It would be impossible to have a party without these sorts of people doing work the average voter doesn't care about.

And these people are hardly the "establishment" in any meaningful sense of the word. Consider the process in Colorado. There was a hierarchy at play, no doubt—delegates at precinct caucuses voted for delegates to district and state conventions, who voted for delegates to the national convention. But the process was open to any registered Republican, and more than a thousand people served as delegates at the state convention. There were some big political players involved, naturally, but by and large they were just average people. The same goes for the state conventions in places like Wyoming and North Dakota. These meetings in Cheyenne and Bismarck are in no way beholden to, or the equivalent of, the power players working on K Street.

Trump might retort that Cleveland delegates should never be unbound from him, that they should be required to vote for him through the duration of the convention. But how would the party ever reach consensus in a scenario where no candidate won a majority and every delegate is bound forever? If the voters cannot agree among themselves, then somebody has to find the middle ground. The convention delegates, chosen through a fair and open process at the precinct, district, and state levels, are an obvious choice to complete this task. And this indeed will be their job in Cleveland.

Trump could have worked harder to win loyal delegates at these local conventions. He might also have broadened his appeal, so that he stood a better chance of winning a majority of pledged delegates on the first ballot. But he did neither and now is trying to delegitimize the process. His complaint is the only thing that is illegitimate. The truth is that this process of selecting delegates is fair and proper. It just hasn't worked out to Trump's liking so far.

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.