The 2016 election reduced the Democratic Party to a smoking pile of rubble. And this weekend, the Democratic National Committee will decide who should get the difficult job of rebuilding from that wreckage, when it elects its new chair.

The race for DNC chair has emerged as an early battleground in the contest over what the Democratic Party’s future should look like in the age of President Donald Trump. Since the current chair, Donna Brazile, isn’t running again — she was just appointed to serve out the remaining months in the term of Debbie Wasserman Schultz, who resigned in controversy this summer — the field is wide open.

The top contenders are thought to be Rep. Keith Ellison (D-MN) and former Secretary of Labor Tom Perez. But neither is thought to have locked down enough support to win just yet, and there are seven other candidates currently in the race.

Whoever wins will become a leading voice in a Democratic Party that has lost so many of its leaders — but he or she will also have to take on the less glamorous, more practical work of rebuilding a badly reduced party across the county.

But though a party chair race often bears a surface resemblance to a public referendum on the party’s future direction, the outcome will actually be decided by the more than 400 DNC members who have their own incentives, interests, and policy preferences. Here’s how things will work.

What is the DNC?

The Democratic National Committee is the closest thing there is to a permanent organization representing the national Democratic Party, and its main overall goal is to help Democratic candidates get elected across the country, from president on down.

Technically, the DNC is a sort of party governing body with 447 or so voting members, most of whom are chosen in various state Democratic Party chapters. But since the full membership doesn’t meet very often, in practice a chairperson elected by those members has a pretty free hand to run things.

Functionally, much of what the DNC does involves raising a lot of money (over $264 million in the 2016 cycle) and using it to pay staffers to get out the party’s message nationally, organize in various states, pay for ads, and fund state party organizations directly.

The DNC also sets the rules for the Democratic presidential primaries and helps plan the party’s national convention. When delegates convene for that convention, they supersede the DNC in authority and have the power to change the party’s rules. But except for that four-day period that occurs once every four years, the DNC runs its own shop. You can read its current charter here.

The broader context for this current contest, though, is that the DNC has become the subject of intense controversy of late. President Barack Obama and his White House had a strained relationship with the DNC for years, reportedly believing it to be a dysfunctional mess. Then, during the 2016 primaries, Bernie Sanders and his supporters criticized the DNC under Wasserman Schultz for what he saw as favoritism toward Hillary Clinton’s candidacy. Finally, staffers’ internal emails were hacked and posted to WikiLeaks (by Russia-connected hackers, most think).

How does the DNC chair election work?

On the weekend of February 24, 2017, those 447 or so members of the Democratic National Committee will meet and vote to determine its new leadership. According to the group’s charter, the chair (and eight other leadership officers) will be elected by “a majority vote.”

If there’s a Democratic president, this vote tends to be a formality — the tradition is that the president hand-picks the chair, and the DNC members back his choice. President Obama, for instance, chose Sen. Tim Kaine in 2009, and Rep. Debbie Wasserman Schultz in 2011.

But it’s when the party has lost the most recent presidential election that things get interesting. Then, various entrepreneurial contenders wage months-long campaigns to try to become chair. The campaign will be waged in part in public, but it will truly be aimed at those DNC members who will actually get a vote.

So who are these DNC members?

The vast majority of the DNC’s members — a little more than 70 percent — are chosen in the various state chapters of the Democratic Party. The remainder are chosen by various national Democratic groups or by the DNC chair herself.

112 slots go to state party chairs and vice chairs (or technically, to the chair and the highest ranking state party officer of the opposite sex). That means two leadership slots each go to the state chapters of the Democratic Party in each of the 50 states, as well as the District of Columbia, Puerto Rico, Guam, the Virgin Islands, American Samoa, and the Northern Mariana Islands.

(or technically, to the chair and the highest ranking state party officer of the opposite sex). That means two leadership slots each go to the state chapters of the Democratic Party in each of the 50 states, as well as the District of Columbia, Puerto Rico, Guam, the Virgin Islands, American Samoa, and the Northern Mariana Islands. 208 more slots go to the various state parties to fill, allocated by population and Democratic vote total . Basically, the DNC uses a formula that gives more seats to bigger states, and gives a bit of a bonus to states that vote more for Democrats in presidential elections. So California gets 20 of these slots, Texas gets 10, and the smallest states and territories just get two each.

. Basically, the DNC uses a formula that gives more seats to bigger states, and gives a bit of a bonus to states that vote more for Democrats in presidential elections. So California gets 20 of these slots, Texas gets 10, and the smallest states and territories just get two each. 48 slots go to various national Democratic groups . Certain groups representing Democratic politicians (governors, county officials, municipal officials, state legislators, state treasurers and so on) and constituencies (the Democratic Ethnic Coordinating Committee, Federation of Democratic Women, College Democrats, Young Democrats of America, etc.) get a few slots each. The existing nine-member DNC leadership gets nine votes.

. Certain groups representing Democratic politicians (governors, county officials, municipal officials, state legislators, state treasurers and so on) and constituencies (the Democratic Ethnic Coordinating Committee, Federation of Democratic Women, College Democrats, Young Democrats of America, etc.) get a few slots each. The existing nine-member DNC leadership gets nine votes. Four slots go to Democrats Abroad . Well, technically there are eight DNC representatives from this group representing Democratic expats, but they each only get to cast half a vote, so we’ll count them as four.

. Well, technically there are eight DNC representatives from this group representing Democratic expats, but they each only get to cast half a vote, so we’ll count them as four. Up to 75 slots are appointed by the DNC chair. These appointments have to be approved by the DNC. Check out this list to get a sense of who then-chair Debbie Wasserman Schultz appointed to these slots in 2013 (a mix of local Democratic notables, party operatives, “government relations” professionals, and interest group bigwigs).

So if all of these slots are filled, there would effectively be 447 votes on the full DNC. It would therefore take a majority of 224 votes to be elected as DNC chair.

Now, the DNC’s exact roster of current members doesn’t appear to be easily available on its website. But a reader has sent along a membership list dated January 26, 2017, and I’ve posted it here.

So what happens during a DNC chair campaign?

Essentially, the various contenders make their cases to the party that they’re the best qualified to lead the organization. They seek endorsements from DNC members, from state party delegations, and also from party interest groups (for instance, big unions) that could influence those DNC members’ votes.

Since Bill Clinton and Barack Obama each hand-picked the DNC chairs who served during their presidencies, and since the 2001 race was essentially a coronation of Clinton ally Terry McAuliffe, there’s only been one contested DNC chair race in the past 25 years — the 2005 contest eventually won by Howard Dean.

In that race, Dean was fresh off a failed presidential primary bid where he had gained the love of liberal activists and impressed even the party establishment with his ability to energize the grassroots and raise money online. Initially viewed as an underdog, he spent the months after John Kerry’s 2004 presidential defeat wooing state party members and convincing them of his vision to rebuild the party. Dean won them over by selling them on his organizing skill — but also, crucially, by promising to hand over at least $11 million to state party chapters to help them pay staffers.

Several other less prominent candidates failed to gain momentum, and when Dean won the endorsement of the Association of State Democratic Chairs — a group which can control a hefty number of votes in the DNC race if it unites — and convinced the AFL-CIO to stay neutral, it became clear he’d get enough votes to win. By the time the actual voting rolled around, all his opponents dropped out, and the DNC elected Dean in a voice vote without opposition.

To find other contested DNC races, you have to go back to the 1980s, when the party lost three successive presidential elections. For instance, in 1985, the various DNC chair candidates hotly debated whether the party needed to “lessen the influence of liberal activists, minorities and organized labor” and better appeal to “Middle America,” as the New York Times put it. One unsuccessful candidate urged Democrats to “move to the center” and become the “party of capitalism” — that candidate was Nancy Pelosi. (She was defeated by Paul Kirk, a Ted Kennedy ally.)

Four years later, in 1989, the party grappled with the after-effects of Rev. Jesse Jackson’s unsuccessful primary campaign and Michael Dukakis’s landslide defeat in the general election as it chose its new chair. So Ron Brown — a Washington, DC, lawyer who had worked for both Jackson and Ted Kennedy — decided to shake up the race by running to become the first black chair of the DNC. Like Dean, Brown ended up locking down so much support that all his opponents dropped out before the election took place.

So, this is a high-stakes contest that will determine the leader of the Democratic Party, right?

The race for DNC chair is important. Whoever ends up as chair can have a serious impact on Democrats’ decisions, organization, and spending priorities over the next few years, as the party embarks on this extremely difficult task of rebuilding from its 2010, 2014, and 2016 wipeouts. He or she will also become a prominent voice in the media, trying to drive the party’s message and criticize President Trump.

But whoever wins won’t really be in the leader of the Democratic Party as a whole in any meaningful way. The party’s congressional leaders — Chuck Schumer and (probably) Nancy Pelosi — will keep running their own shops. The House and Senate campaign committees operate separately from the DNC, as does the Democratic Governors Association.

Furthermore, the popular former President Barack Obama will have just left office and will remain a leading voice to the extent he chooses to keep commenting on current affairs. And in just a little more than two years, the presidential primaries will begin and overshadow pretty much everything else — that’s what will determine the real new leader of the party.

Still, it is the DNC that will set the rules for and administer that primary process. And it’s the DNC that will help determine whether Democrats can in fact make gains in the 2018 midterms against President Trump’s Republican Party. So while the outcome of the chair race surely won’t be the last word on just where the Democratic Party is going, it will be one early indicator of how the party is grappling with its current controversies and where things might be headed.

This piece was updated on February 13, 2017 with a newer DNC membership list.