That edge was largely driven by Democratic women, who backed female candidates by 31 points.

Republican women were four times as likely to favor a male candidate than a female candidate.

Donald Trump’s presidency has spurred a wave of grassroots energy among Democratic women, with a record-breaking number potentially set to book their place in the House in November.

A new Morning Consult survey examines how personal traits — such as gender, race, religion and occupational history — factor into voters’ preferences for House and Senate candidates and underscores how Democrats are prioritizing female candidates and people of color.

The national online poll, conducted August 24-26 among 1,970 registered voters, shows Democratic voters favor female candidates over male ones by a net 19 percentage points. Democrats also were more likely to prefer candidates who are Native American, black or Hispanic over white candidates. The survey has a margin of error of 2 points.

The two national incumbents from the political left who were ousted in primaries this year, House Democratic Caucus Chairman Joe Crowley (D-N.Y.) and Rep. Michael Capuano (D-Mass.), were both staunch progressives who in most cases were in lockstep with the liberal base of their party. But they are also older white men who represent districts where most of the constituents are people of color.

That made them particularly vulnerable to their respective challengers, Bronx-born activist and Democratic socialist Alexandria Ocasio-Cortez, whose mother was born in Puerto Rico, and Boston City Councilor Ayanna Pressley, set to become the first black woman to represent the Bay State in Congress.

MC/Washington:Subscribe

Get the latest news, data and insights on politics, policy and government.

SIGN UP

Sean McElwee, a Democratic activist and co-founder of Data for Progress, a progressive think tank, said those victories spoke to the power of descriptive representation, where constituents want their elected officials to represent them from a demographic perspective, rather than just on matters of policy.

“The biggest divide between the establishment of the party and of the base is actually descriptive, rather than ideological,” he said in a phone interview last week.

Both Democrats and Republicans tended to agree on some broader characteristics of potential candidates, including picking those who have always lived in the area they would represent. Most respondents also said they’d be more likely to vote for veterans, teachers and small business owners.

But partisans were divided when it came to the racial and ethnic diversity, gender and sexual orientation of potential candidates.

While the survey shows Democrats prioritizing women and people of color, male candidates had the edge with GOP voters over women by a margin of 16 points, and being white was a significant positive compared with any other racial demographic.

A recent analysis by David Wasserman of the Cook Political Report showed that while House Democrats could increase their ranks of women by more than one-third in November, the GOP’s number of women could shrink by a similar amount. Currently, there are 84 women serving in the House.

More than 4 in 5 House Republicans are white men, compared with 2 in 5 House Democrats.

The predilection for white male candidates is a problem for the GOP going forward, said Republican strategist Susan del Percio. White males make up 31 percent of the U.S. population according to census data.

“It means that the base is only going to get smaller and smaller, because we’re not going to nominate more diverse candidates,” del Percio said in a Monday interview, adding that the party should work “to be an inclusive party, and the party of Lincoln instead of the party of Trump.”

Partisan differences on candidates’ preferred gender was largely driven by women voters themselves. By a margin of 31 points, Democratic women said they were more likely to vote for a female candidate, compared with a 4-point edge among Republican women voters, who were four times as likely to prefer a male candidate.

Melissa Deckman, a public affairs and political science professor at Washington College and author of “Tea Party Women: Mama Grizzlies, Grassroots Leaders, and the Changing Face of the American Right,” said a “traditional patriarchy” still holds appeal for some Republican women.

She also said the responses among those voters could also represent a response to media coverage of women’s success in Democratic primaries.

“I think you are picking up a backlash,” she wrote in a Monday email. “In my work on conservative women, I found many were resentful of the notion that women in politics were linked with more Democratic or pro-choice cases; they also tended to poo poo any sort of affirmative action as anathema to their values.”