Bernie Sanders has won the Nevada caucuses — the third contest in the Democratic nomination process — according to a call by Decision Desk.

The win is Sanders’s most decisive yet and makes clear, if there was any doubt, that he is the frontrunner to win the Democratic nomination.

Like Iowa, there are three sets of results from Nevada. First there’s an initial round of voting. Then supporters of poorly performing candidates (who are below 15 percent in the precinct) can realign and switch to back someone else — following which, precincts will tally up the second and final vote total.

In each precinct, then, candidates get awarded county convention delegates based on how they did in the final vote total. Those county convention delegate totals get added up statewide, and that’s the main metric determining who “wins” Nevada. The other results further down on this page. (Sanders is the clear leader by all three metrics.)

As for when full results will be in — that isn’t entirely clear. Nevada Democrats are trying to rigorously vet the results before reporting them, to avoid problems similar to Iowa’s.

How the Nevada caucuses work

Let’s walk through how the caucus process unfolded in a little more detail.

It began when, at each precinct, attendees divided into groups based on which candidate they support. Then, the first-choice early votes for each candidate were revealed. After that, the precinct’s Round 1 vote is tallied, below:

Next, supporters (either in-person or early voters) for any candidate at 15 percent of the vote in each precinct were locked in — those candidates became officially viable.

But anyone who initially backed a candidate with less than 15 percent of the vote then got the chance to realign. They can back a viable candidate, combine forces to get a nonviable candidate over the 15 percent threshold, or back no one at all.

Once the in-person realignment concludes, there’s the early vote redistribution. That is: Each early voter whose first-choice candidate ended up nonviable will have their vote moved over to their highest-ranked candidate who is viable.

So, for instance, if an early voter ranked Joe Biden first, Amy Klobuchar second, Tom Steyer third, Pete Buttigieg fourth, and Elizabeth Warren fifth — but only Warren and Bernie Sanders ended up viable in their precinct — this vote would be distributed to Warren.

The final vote total was then tallied in each precinct (combining the realigned in-person vote and the redistributed early vote), below:

After that is when delegates come in.

Each of the nearly 2,000 precincts in Nevada has been assigned a specific number of county convention delegates, based on how many registered Democratic voters are in the precinct. Some precincts have just one delegate, some have dozens — you can review the whole list here.

So in each precinct, the delegates were split up among viable candidates proportionally according to the final vote total. Rounding comes into play here, because delegates are people and don’t get split up fractionally. (In the case of a tie, there’s a distinctly Nevadan solution: Cards were drawn, with the high card determining the winner). Regional discrepancies in support can also come into play, as they did in Iowa (where Sanders led the statewide final vote, but Buttigieg currently has a narrow lead in the delegate metric).

However, it’s already clear that Nevada’s results won’t be as close as Iowa. Sanders has clearly won Nevada according to all three metrics.

Don’t forget national delegates, either

The county convention delegates are traditionally used to determine the “winner” in Nevada. But that’s not the end of things either — the delegates to the Democratic National Convention have to get allotted, too. (It is these national delegates, after all, that will determine the Democratic nominee in the end.)

Some of these national delegates will be allotted proportionally based on the statewide results — but, to prevent things from being too simple, some will depend on the proportional results in each of Nevada’s four congressional districts matter as well.

Nevada will send 36 pledged delegates to the Democratic National Convention. And of these:

13 will be allotted based on statewide results

5 will be allotted based on results in the 1st congressional district

6 will be allotted based on the results of the 2nd district

6 will be allotted in the 3rd district

6 will be allotted in the 4th district

If a candidate doesn’t clear 15 percent in a district, they’ll get none of that district’s delegates. So here as well, it’s possible for geographic differences in support to affect the outcome.

It’s a complicated process. But Nevada managed to pull it off better than Iowa did — and could make a case to be the first state to vote rather than the third next time around.