Democratic presidential candidate Sen. Elizabeth Warren (Mass.), left, speaks with Chris Giunchigliani at a campaign event on July 2 in Las Vegas. (John Locher/AP)
Opinion writer

When the 2020 presidential primary race began, many Democratic voters worried that if their party nominates a woman, it will be 2016 all over again: a campaign saturated in toxic sexism that ended in a victory for America’s most toxic sexist, a man who became president despite being on tape bragging about his ability to sexually assault women with impunity. The country, they feared, might just not be ready to elect a woman to its highest office.

With the campaign in full swing, those fears have not disappeared, even if they may have diminished a bit. What’s clearer than ever is that given how the two parties are evolving, no matter who the Democratic nominee is, gender will be a critical factor in the outcome of the 2020 election.

But it’s complicated. Let’s start first in North Carolina, where a primary runoff was held Tuesday for a special election to fill the seat of the late Rep. Walter B. Jones (R), in a solidly Republican district. Those concerned about the increasingly male face of the GOP invested time and money in the candidacy of Joan Perry, who got trounced by Greg Murphy, a state representative.

As Julie Hirschfeld Davis of the New York Times reported from North Carolina, Perry ran into a suspicion that despite the extremely conservative stances she took on issues, “maybe because she’s a woman she might not be as hard-line as I want her to be," as Davis put it, characterizing the views of GOP voters.

So with Perry’s loss, the number of Republican women in the House will stay at an incredible 13, out of 197 Republicans. In other words, the House GOP caucus is 93 percent male. Republicans do only slightly better in the Senate, where their caucus is 85 percent male (the figures for Democrats are 62 and 64 percent male, respectively).

Plenty of Republicans are concerned that this dynamic affects how the party is perceived when it comes to competitive elections: Women struggle to win Republican primaries, leaving the face of the party almost entirely male, and combined with the positions the party takes, such as its unceasing efforts to outlaw abortion, it ends up sending a message of unremitting hostility to women. As Rep. Liz Cheney (R-Wyo.) said in response to Perry’s loss, “We have to work very hard as Republicans to convince more women to run for office, but also to convince more women to vote for us.”

But when they don’t — and when the party is led by President Trump — voters (both women and men) begin to see the entire GOP as sexist. As political scientist Brain Schaffner argues, based on an analysis of 2016 and 2018 voting patterns:

In 2018, Republican House candidates were penalized by voters who don’t hold sexist views in a way they were not in 2016. And [Trump’s] rhetoric does not appear to be winning the party any new supporters to make up for those losses ... the data here suggest that after two years as president, Trump’s sexism has begun to become part of the Republican Party’s branding for GOP House candidates.

But the picture is even more complicated, because it isn’t only Republicans who hold sexist beliefs. As Schaffner and Sam Luks explain in The Post, about a quarter of Democratic voters hold beliefs they categorize as “hostile sexism” based on answers to survey questions asking respondents whether they agree with statements such as “Most women fail to appreciate all that men do for them” and “Women seek to gain power by getting control over men.” And those beliefs have a strong effect on which presidential candidate they’re supporting, at least so far:

Among the least sexist voters, [Joe] Biden and [Sen. Elizabeth] Warren are neck-and-neck; among the most sexist Democratic primary voters, Biden is preferred by as much as a four-to-one margin. Warren’s support drops from nearly 30 percent among the least sexist voters to less than 10 percent among those who are most sexist. Harris’s support drops from around 15 percent among the least sexist voters to less than 5 percent among those who are most sexist.

That doesn’t mean that the female candidates are doomed, just that it’s one factor hurting them and helping the male candidates. Nor does it mean that even the most sexist Democratic voters won’t support their party’s candidate in the general election if she’s a woman; party identity will be the most powerful force at play, probably overwhelming every other consideration.

But here’s what we know: Gender is going to be a critical factor in both the primaries and the general election in 2020. It will make it harder for a woman to become the Democratic nominee, not only because of a certain degree of sexism among Democratic voters but also because of the perception that the wider electorate is sexist and therefore nominating a man is a safer choice.

That perception may be right, or it may be wrong. We can’t be sure yet because we don’t know exactly what the general election will be like. The dynamics will change depending on which man or woman faces off against Trump. Trump himself may do more or less to emphasize his own misogyny. Other issues could become more important.

But it does seem clear that the gender gap is only growing bigger. In 2016 it was the highest in history: Trump won men’s votes by 11 points (52-41), while Hillary Clinton won women’s votes by 15 points (54-39). What has happened since then? More women have come forward to accuse the president of sexual assault, the GOP became more male in its public face, we had the battle over Brett M. Kavanaugh’s Supreme Court nomination, Republicans got closer than ever to overturning Roe v. Wade (and might succeed before November 2020) and six Democratic women ran for president.

That’s a recipe for a general election in which questions of gender and sexism matter more than ever. Especially if the Democratic nominee is a woman, but even if it’s a man.