Even today, 49 percent of voters are registered Democrats in West Virginia, but Mr. Obama won just 35.5 percent of the vote against Mitt Romney in 2012. Mr. Obama won just 59 percent in the 2012 primary in a one-on-one contest against Keith Judd, who was in prison at the time and who will be on the West Virginia ballot again on Tuesday.

The results of these counties have another odd characteristic: a huge number of votes for minor candidates. In Coal County, around 6 percent of the vote went to the former Maryland governor Martin O’Malley, and obscure candidates like Michael Steinberg (3 percent), Mr. Judd (4 percent), Star Locke (4 percent) and Roque De La Fuente (2 percent) also picked up support. These candidates combined to receive nearly as many votes as Mrs. Clinton — and in other counties, they actually did.

In the open primaries, as in Texas or Alabama, these conservatives tend to vote in the Republican primary — just as they vote for Republicans in presidential elections. But in closed or semi-closed contests like Florida, Louisiana and Oklahoma, such voters must cast ballots in a Democratic primary if they want to vote in a primary at all. The result: Mrs. Clinton’s support surges once you cross the state line from Oklahoma to Texas, but the turnout plummets.

The same effect can be seen across the South. Mr. Sanders fared far better in the Florida Panhandle, where a majority of voters are often registered Democrats but Republicans prevail, than he did on the other side of the state line in Alabama or Georgia, with their open primaries.