By many measures, the two major political parties are moving in opposite directions when it comes to racism and sexism. As researchers have repeatedly documented, anti-black prejudice, anti-immigrant attitudes and sexism divided Democratic and Republican voters in 2016 more sharply than ever before — with people who hold stronger racist and sexist views gravitating toward Donald Trump. Meanwhile, over the past five to 10 years, white Democrats have undergone a “Great Awokening”: In a racially progressive turn, they are more likely than ever, polls find, to view discrimination as an impediment to African American progress and to say immigrants strengthen the country.

Despite these trends, some members of the Democratic Party still have conservative attitudes about race and gender, and these beliefs have opened up major divisions in the 2020 Democratic presidential primary race, as suggests my analysis of survey data, focusing on four consistently high-polling candidates: former vice president Joe Biden and Sens. Bernie Sanders (I-Vt.), Elizabeth Warren (D-Mass.) and Kamala D. Harris (D-Calif.).

Democratic voters who score high on a scale that measures sexism, for example, gravitate toward Biden and Sanders and away from Warren and Harris — which is not shocking. But another Biden metric is more surprising and even paradoxical: He attracts the largest proportion of voters who score high on a scale that measures anti-black prejudice, while also garnering the most support, by far, among black voters.

Indeed, racial resentment and sexism more strongly predict support for the former vice president than many other demographics and policy views do — more than voters’ gender, for example, or their stances on Medicare-for-all or on abolishing the Immigration and Customs Enforcement agency. Race and gender views often play a larger role than policy preferences in shaping opinions of the other candidates, too.

There has been endless debate in Democratic circles, much of it fuzzy, over “electability” — policies aside, which candidate is best equipped to take on and beat President Trump? But the counterintuitive feat Biden has achieved, as reflected in this data, might hint at the possibility of an effective general-election strategy: appealing to African Americans, a core Democratic base, while also stemming, if not recouping, losses from racially resentful voters who fled the Democratic Party in 2016. There are limits to this strategy, however, given that prejudice does not abound among Democrats. (In the 2018 Cooperative congressional Election Study, for example, the average Democrat scored 0.33 on a racial resentment scale whose top value was 1, whereas Republicans scored 0.75.)

I focused on Biden, Warren, Sanders and Harris because they were leading in the polls at the time I did the analysis, which drew on a national survey of 2,953 Democratic voters conducted between June 24 and July 2 by Data for Progress and YouGov Blue. Fortunately, the occasional outlier aside, these four candidates have consistently led polls, so the findings remain relevant.

To capture sexism, I relied on questions in the survey that were developed by psychologists to measure levels of “hostile sexism.” Survey takers were asked to indicate whether they agreed with such statements as “women are too easily offended” and “women seek to gain power by getting control over men”; the higher the agreement levels, the higher the hostile-sexism score. To gauge anti-black sentiment, I made use of two questions designed to establish levels of racial resentment — questions that approach the issue of racism indirectly, in an attempt to prevent people from defaulting to answers that they know are socially preferred. One question probed whether the survey taker agreed that slavery and discrimination have made progress difficult for black Americans; the other asked whether blacks should learn to work and live without “special favors.” About 20 percent of likely Democratic primary voters scored on the higher end of these prejudice measures (that is, above the neutral point on the scales), but responses on the high and low ends still substantially predicted candidate choices.

As you move from the least sexist to the most sexist Democratic voter, the likelihood of voting for Biden rises by 19 percentage points — and decreases for Warren by 24 points. Strikingly, while sexism correlates with support for Biden regardless of a voter’s gender, the dynamic works differently in the case of Sanders: Sexist men prefer Sanders more than non-sexists do, but women who hold sexist views do not gravitate to him.

Anti-black racial resentment also dictates, in different ways, preferences for Biden, Warren and Harris. All else being equal, Biden’s vote share increases by 27 points going from the least to the most racially resentful primary voter. Meanwhile, more racially progressive Democrats — especially racially progressive whites — side heavily with Warren, which makes sense, given her messages on the campaign trail, such as explicitly calling the U.S. criminal justice system racist. Anti-black prejudice, not surprisingly, dampens support for the leading black candidate, Harris. It appears not to affect backing for Sanders.

What accounts for Biden’s strength with racial conservatives in the Democratic Party? As factions of the party embrace racial progressivism — including reparations for slavery and its effects — Democrats who score higher on the racism scale may feel more comfortable with Biden because of his association with President Bill Clinton’s tough-on-crime stances in the 1990s (which had a disparate racial impact) and his defense of criminal penalties for people apprehended while crossing the southern border.

To understand how Joe Biden became a presidential contender, you have to start in Delaware. (Lee Powell/The Washington Post)

Yet neither Biden’s rhetoric nor his historical baggage has steered away African Americans. Controlling for such factors as age and income, Biden’s support is 18 percentage points higher among blacks than it is among whites.

Biden’s link to Barack Obama — and his continual embrace of the former president — as well as the built-in advantage Biden has in being the best-known Democrat in the race appear to be driving his support among African Americans. Assuming that black preferences are immovable would be shortsighted, however: We need only look at 2008 and recall how blacks swung dramatically from Hillary Clinton to Obama over the course of the primaries, transforming the race.

The dynamics could shift in other ways, too. Given that Biden may have already tapped the reservoirs of prejudice in the party — again, present in about 1 in 5 likely voters — any more racially controversial remarks, like his fond reminiscences about having once worked civilly with segregationist senators, could backfire. Such comments could make progressive Democrats all the more reluctant to coalesce around him as the primary field narrows.

However, if his black support remains strong, even whites who hold racially progressive views may have little choice but to fall in line. Revitalizing black turnout is key to Democratic presidential prospects, as is avoiding further alienating working-class whites with racially conservative attitudes, inside and outside the party. So far, Biden is the candidate who is most successfully holding those two parts of the Democratic Party together, while also showing potential appeal to a less progressive general-election crowd.