As Bernie Sanders has suffered a series of stinging defeats over the last few weeks, he has trained his criticism on one barrier to his candidacy: the closed primary.

Sanders first railed against closed primaries shortly before his landslide loss in New York, a state that requires independent voters to become Democrats to participate in the presidential contest a full six months before voters go to the polls. New York's rules may have been particularly strict, but he's since repeatedly taken issue with the concept of the closed primary more broadly.

"Three million people in the state of New York who are independents have lost their right to vote in the Democratic or Republican primary," Sanders thundered, according to the New York Daily News. "That’s wrong."

There's more than a smidge of self-interest here: Sanders does far better among independent voters than among registered Democrats, and so he does much better in open primaries than closed ones.

Moreover, Sanders didn't complain after winning landslide victories in states that choose their nominee via caucuses — which arguably makes it even more difficult to participate by requiring that voters spend multiple hours at the polls.

But even if you think it's self-serving, Sanders's call to include independents in primaries raises a critical question for the future of the Democratic Party.

Independents are the fastest growing slice of the American electorate, especially among young people. Whether the party can successfully bring them into the fold may prove a make-or-break question for the Democratic coalition — one that, in turn, could hinge on whether independents are given a say in the party's presidential nominee.

The origins of the open/closed primary patchwork

The political parties have four basic forms of voting for their presidential nominees: open primaries, closed primaries, open caucuses, and closed caucuses.

Beyond these four variations, there's even greater complexity in the nominating system — like "semi-closed primaries," which are open to independents but not voters affiliated with other parties; and state-specific rules with different registration deadlines to sign up to vote.

This patchwork's origins lie with the 1968 Democratic National Convention, when Hubert Humphrey, a candidate who never officially ran in a primary, wound up getting the nomination. Afterward, the party's leaders passed a series of reforms to give Democratic voters greater control over the nominating process. One of those reforms was a requirement that all of the states that held primaries should hold binding closed primaries, says Andrew Busch, a political scientist at Claremont McKenna College.

"Their driving mantra was: We want maximum meaningful participation by Democratic voters," Busch says. "And the way they understood that was: If non-Democrats could vote in Democratic primaries, it would dilute the influence Democratic voters could exert."

But some states, including Wisconsin, had already been holding "open primaries," in which anyone could vote, since the early 20th century. Wisconsin defended its open primary against the DNC in front of the Supreme Court — and won.

By the early 1980s, the DNC had given up on trying to move everyone to the closed primary. Since then, each state has essentially had free rein to tailor its rules without top-down control, according to Busch, who is author of Outsiders and Openness in the Presidential Nominating System.

"Ever since, there's been this back and forth within each party on the better way of doing it," Busch says.

The case for closed primaries

One important argument in favor of limiting participation in primaries to party members is that doing so gives independents an incentive to register for the party, and it rewards those who commit to becoming team players.

"When primaries first started, it was as a way to give the rank and file a say," says Richard Berg-Andersson, who tracks presidential primaries at the Green Papers.

Loyal party members can resent the idea of someone with no allegiance to the party selecting its most important nominee, Berg-Andersson says.

"The attitude is: We're the ones working hard, licking the envelopes, handing out the brochures," Berg-Andersson says. "And we don't like the notion that someone who shows up every four years to vote and isn't really committed to the party gets to help choose its nominee."

From the vantage of someone looking to build up the Democratic Party, this makes sense. Why shouldn't party officials — who also have to worry about state and local elections — use excitement over high-profile presidential nominating contests to bolster their bases of support?

"The Democratic primary should be determined by Democratic voters," Democratic National Committee Chair Debbie Wasserman Schultz recently told the Washington Post.

This is particularly important for a party that's devoted not just to taking the White House, but to trying to win the other levers of power in Washington, DC, too.

It sounds obvious, but it's a powerful defense of the closed primary: It takes party members to win critical down-ballot seats, and party leaders want to do what they can to turn interested voters into loyal partisans.

Closed primaries also help prevent the parties from being taken over from outside

Closed primaries also serve another function: ensuring that the party's opponents can't come in and strategically prop up its weakest candidate.

Early in this primary, for instance, some Democrats in open primary states voted for Donald Trump because they think he would be an easy foe to beat. In 2008, Rush Limbaugh launched "Operation Chaos," in which the radio host urged conservative voters to strategically vote for Hillary Clinton to prolong the Democratic primary.

"There's a real concern among party leaders and party activists that people who participate in open primaries are gaming the system, that there are saboteurs who want to blow up the party from the inside," says Eric McGhee, a research fellow on electoral reform at the Public Policy Institute of California.

In most cases, people tend not to vote across party lines strategically to hurt the other party, according to the political scientists I interviewed for this story. "The evidence of this actually happening is very weak," McGhee says. "Voters want to vote for the person they like best — not because they're trying to play games."

Still, while voting across party lines may be rare, you only have to look at this election to see that open primaries really do run the risk of letting outsider candidates launch successful insurgencies.

Clinton has won big in closed primaries limited to Democrats, while Sanders has won big in open primaries where independents can participate. From the perspective of the Democratic establishment, the closed primaries are then doing their job: serving as a firewall to protect the party's choice.

The case for open primaries

But if Sanders is showing party officials that closed primaries risk takeover from outsider candidates, he's also demonstrating what may be their main weakness: keeping potential new voters out of the party.

This fear has been behind most decisions to embrace open primaries. The best example of this may be in the 1960s and 1970s, when southern Republicans opened their party primaries to get white voters — who had been reliable Democrats dating back to Reconstruction — used to the idea of voting for the GOP.

"They were trying to build their party at the local level, and they saw it as a mechanism for bringing in independents and Democrats," Busch says. "They wanted to get Southerners used to voting Republican, and they saw it as a party-building mechanism."

Similarly, on the Democratic side, open primaries have largely been thought of as a way to broaden the base and draw in moderates. And this is one key argument in their favor: Primaries can arguably lead to candidates that independents like better, thus broadening the party's appeal.

In 1972, for instance, the liberal George McGovern won the presidential nomination in part by getting committed, fired-up activists to turn out to caucuses. Holding open primaries instead to increase the overall voter pool, the reasoning went, would give moderates a greater say in the outcome.

This is still the conventional wisdom for supporting open primaries: that they'll pull the parties toward the center. In 2014, Sen. Chuck Schumer outlined this case in the New York Times in an op-ed titled, "End Partisan Primaries, Save America."

"In most states, laws prohibit independents — who are not registered with either party and who make up a growing proportion of the electorate — from voting in primaries at all," Schumer wrote.

Getting rid of this restriction, Schumer said, would help "prevent a hard-right or hard-left candidate from gaining office with the support of just a sliver of the voters of the vastly diminished primary electorate."

Sanders suggests open primaries won't lead to more moderate nominees

There's one way in which the 2016 Democratic primary affirms both Schumer's and the traditional case for the open primary: Sanders's campaign does appear to be getting young voters excited about the Democratic Party, as this Harvard poll shows:

But set against Schumer's other goal — moderating the Democratic Party — and Sanders is blowing up the case for the open primary altogether.

The premise of Schumer's editorial is that opening the primaries will lead more moderate voters to push the Democratic party in a centrist direction. But political scientists don't think that's the case — as Sanders's candidacy is demonstrating, sometimes the most popular candidate among independents isn't "moderate" by any standard.

"Voters don't normally choose more moderate candidates when given the chance to cross party lines, because it turns out 'moderates' aren't that moderate," says UC Berkeley political science Doug Ahler.

Some research is in fact now suggesting that the opposite is true. Barbara Norrander, a political science professor at the University of Arizona, has found that voters in closed primaries without independents may actually be closer to the ideological center than voting groups that include independents.

Why that would be the case is still being researched, but Norrander tells me in an interview that the very act of signing up for the party may make voters more inclined to back the party overall.

"Closed primaries encourage people to register as partisans, and then that affects their party identification and their attitudes," she says.

Sanders's insurgency could push Democratic elites toward more closed primaries

For Sanders, all of this talk about how the primaries affects the party's positions is beside the point.

Sanders is arguing for open primaries not on the instrumental grounds of improving the party's position, but on the more abstract principle that it's better to have as many people involved in the process as possible.

Many observers, for instance, criticized April's New York primary because it had the earliest deadline to declare party affiliation in the country. But Bernie (and, later, his wife Jane) blamed something else altogether — the very idea that independents could be legitimately excluded from the Democratic primary.

"In a state as large New York, almost 30 percent of the eligible voters, some three million New Yorkers, were unable to vote today because they have registered as independents," Sanders told the New York Times. "That makes no sense to me at all."

But for Democratic officials, the question of open primaries involves a certain real world trade-off that may feel more pressing than the noble cause of expanding the franchise.

"Practically speaking, when states adopt one or another sort of primary there's usually some sort of instrumental reasoning going on," says Busch, the author and political scientist. "It's about responding to fears that you're not going to win."

If they get rid of closed primaries, party officials will give outsider candidates like Sanders an even greater chance of winning next time. And from the perspective of a Democrat who sees keeping the White House as the paramount goal, that's going to be a risk probably not worth taking — even if it earns them grief from some independents.

"I would be surprised if there's a trend toward open primaries after this election. The people who make the decision are in the state legislature — those folks are mostly Hillary Clinton supporters," he says. "They'll want to maintain control of the process next time around, especially after seeing what happens when you have an insurgent running."

The same force that makes open primaries dangerous to the party is also making them necessary

But the same force that's making closed primaries more important than ever is making some other experts think their days are numbered.

The independent voters, some of whom are backing Sanders now, make up close to 40 percent of the electorate — a nearly 10 percent jump in 10 years, according to NPR. The biggest increases are coming among young people, who also make up Sanders's base.

As long as this trend persists, a growing share of voters won't get to participate in the primaries. And that means — barring some major loosening of the primary rules — fewer people every election cycle will feel that they had a say in the presidential nominations, says McGhee, a research fellow on electoral reform at the Public Policy Institute of California.

"Across all states, more and more people for decades have been registering as independents, and that's going to mean increasingly a smaller and smaller slice of the electorate can participate," McGhee says. "I think there's going to be a lot of pressure to open the primaries."

In 1988, 20 states had presidential primaries in which any registered voter could participate. By 2016, that number was essentially unchanged — this year, 22 states held open primaries, according to Matthew Thornburg, a political science professor at the University of South Carolina.

McGhee isn't sure exactly when the pendulum will start to shift. But unless Sanders can lead his young base to become registered Democrats, the party will have a strong incentive to open its primaries — even if it doesn't make the party any more moderate.

"There's more and more independents — a strictly closed primary is going to become more and more uncommon," McGhee says. "In dribs and drabs, some version of an open primary is where things will head."