West Virginia is one of the most conservative states in the country — so why did its voters support Bernie Sanders, who routinely ranks among the most liberal senators, by a margin of 51 to 36?

The answer has a lot to do with the uniqueness of West Virginia's political landscape.

After his victory, Sanders said he won West Virginia on the strength of his "anti-establishment" political revolution. Under his interpretation, Sanders's outsider insurgency has allowed him to scramble the traditional left-right divide and secure the white working class.

Others think this misses a big part of the story. According to the political scientists I interviewed, Sanders may be winning states like West Virginia largely because he's become an all-purpose vessel for conservative Democrats who think the party has moved too far to their left under Barack Obama.

If that's right, Sanders may not have transcended ideological politics but instead become its accidental beneficiary.

The conservative Southern whites supporting the Democratic socialist's insurgency

What's not up for debate is that Sanders is winning big among Coal Country voters who are registered Democrats but think the party's leadership has moved too far to the left.

This came through clearly in last night's exit polls. Asked about Barack Obama's performance, 39 percent of voters in the West Virginia primary said they thought that Obama was too liberal. These conservative Democrats overwhelmingly backed Sanders by a 62 to 29 percent margin.

Moreover, a huge percentage of Sanders voters in West Virginia — 39 percent — said they were more likely to vote for Donald Trump than the Democratic candidate in a general election.

Um no. 39% of Sanders voters in WV say they'd vote for Trump *over Sanders* in the fall. https://t.co/BKOpmKuUHW — Steve Kornacki (@SteveKornacki) May 10, 2016

An analysis from the New York Times' Nate Cohn drives this home: Throughout the primaries, Sanders has done best in Coal Country counties with large numbers of registered Democrats who also voted Republican in the 2012 presidential election.

Are these voters drawn to Sanders, or casting a protest vote against Clinton?

At first blush, this seems totally counterintuitive: Why would conservatives planning to support Trump over Clinton also be voting for the Democratic socialist with far more progressive policies than either candidate?

This dynamic may make more sense if you believe voters in West Virginia were really casting a protest vote against the leadership of the Democratic Party, rather than endorsing Sanders's far-left policy positions.

"There's clearly a slice of Democratic voters who are alienated from what we would think of now as the national Democratic Party, the Obama-led national party," says David Hopkins, a political scientist at Boston College.

This hasn't just been the case in West Virginia, Hopkins says. In New York state, for instance, Sanders swept Clinton everywhere outside of the major cities.

"Rural voters in lots of places are feeling alienated from the Democratic Party leadership, and maybe the political incumbent class more broadly," Hopkins said. "They're looking to express a protest vote — Sanders may be someone they don't agree with on everything, but he's the only other option available to express their views."

It's important not to overstate this: Of course, West Virginia may have gone to Sanders in part because of a protest vote. But Sanders's message has found genuine widespread appeal throughout the Democratic primary, with polling finding 54 percent of Americans believing a "political revolution might be necessary to redistribute money from the wealthiest Americans to the middle class."

The West Virginia protest vote against the Obama/Clinton coalition

In 2012, Obama was running unopposed in the Democratic presidential primary. But he somehow lost 41 percent of the primary vote anyway in West Virginia to a prisoner named Keith Judd, who was then serving a 15-year sentence for "trying to extort his wife in divorce proceedings," according to CBS News.

Judd had complained about Obama's coal regulations before the vote, but nobody would really argue that West Virginians were embracing the ex-convict as their preferred candidate of the future.

Something similar happened last night. While Sanders and Clinton combined for around 87 percent of the vote in West Virginia, close to 10 percent went to a protest candidate named Paul Farrell.

"There's nobody on the presidential ballot I want to vote for," Farrell, a local attorney, said in a release announcing his candidacy. "You have a socialist (Bernie Sanders), a felon (Keith Judd), an alleged immigrant (Ted Cruz), a reality television star (Donald Trump) and a long list of scandalized career politicians. None of them share the values of anyone I know in West Virginia."

These protest candidacies reflect the unique political geography of the state, where 49 percent of voters are Democrats, but Barack Obama has gotten consistently clobbered. (He won just 35 percent of the vote against Mitt Romney in 2012.)

Over the course of the presidential campaign, Clinton has embraced Obama's legacy. So it makes sense that West Virginia sees Clinton as the heir to Obama — and would vote against her as a result.

Are conservative Democrats voting against the party leadership over coal?

A much more complicated question is why these conservative Democrats feel alienated from the Obama/Clinton wing of the party.

One obvious answer is West Virginia's economy. The state has lost more than 40 percent of its coal mining jobs in the last four years alone, and its voters have largely blamed the Democratic Party leadership for advancing environmental regulations, according to Elaine Kamarck, a senior fellow at the Brookings Institute.

"They've been really against the Democratic Party for a while now, and it has to do purely with environmentalism," Kamarck says. "It's really hard to square being concerned about climate change and being concerned about coal: that's how you have to understand the politics of West Virginia."

But as Rebecca Leber notes at the New Republic, Sanders seems like an unlikely beneficiary of this grievance.

Sanders has proposed environmental regulations that are even more sweeping in scale than Clinton's. If Clinton's support for environmental regulations were costing her in the state, why would West Virginia back Sanders's more aggressive plans instead?

One way of looking at this is to say that, by running as a populist, Sanders has made clear to West Virginia that he's really on their side — and that the fine details of his environmental plan are somewhat beside the point.

"Sanders is more of a populist — he wants to screw Wall Street and the big corporations," Kamarck says. "So of course West Virginia voters will like the outsider more than the establishment person."

Is race the real wedge in the Democratic Party?

But if you thought Sanders won the state because of his economic populism, you'd expect him to have done best among its low-income voters.

That didn't happen last night. Sanders actually outperformed his West Virginia results among the state's richest voters, taking those earning over $100,000 by more than 20 points, according to NBC News' exit polls.

Perhaps a better explanation is that race — rather than economics or ideology — helps explain why West Virginia's white voters spurned Clinton.

In the 2008 Democratic primary, Hillary Clinton soundly beat Obama in the Coal Country counties she's now losing to Sanders. Those voters, Hopkins said, were clearly motivated at least in part by Obama's race, and while we can't prove that's happening again this year, it seems likely to assume some version of that is a factor here, too.

"Is the opposition to Hillary Clinton within the party from these voters about race specifically?" Hopkins says. "It was a much easier story when we had an African American in the race; it's a little more complicated this year."

Clinton has done far better throughout the primary among the Democratic Party's black voters. And as Vox's Matt Yglesias notes, what appears to be an ideological divide in the party often turns out to just be a demographic one.

"It seems unlikely that conservative white Democrats are endorsing [Sanders's] socialist views," Hopkins says. "There's something else happening."