Running against former Hewlett-Packard chief executive Carly Fiorina in the 2016 Republican primary, Donald Trump mocked her appearance: “Look at that face! Would anyone vote for that?”

Running against former secretary of state Hillary Clinton in the 2016 presidential race, Trump dismissed her as “unbalanced” and “unhinged,” and questioned her “strength” and “stamina.”

And running against former South Carolina governor Nikki Haley in the 2024 Republican primary, Trump attacked his own former U.N. ambassador as a “birdbrain.”

In nearly a decade of contests against women, the former president has long deployed sexist and misogynistic attacks against female rivals — commenting on their appearance and engaging in gendered stereotypes in a way that could alienate many of the voters he hopes to win over.

Now, with Trump expected to face Vice President Harris in the 2024 presidential race — going up not just against a female opponent, but also a Black and Indian American one — strategists and aides from both parties are girding themselves for an election steeped in allegations of sexism and racism, warning that the dynamic holds potential risks and rewards for both Harris and Trump.

Trump has already begun testing out derogatory nicknames for Harris — “‘Dumb as a rock’ Kamala Harris,” “Lyin’ Kamala Harris” and “Laffin’ Kamala Harris” — as well as accusing her of playing “the race card” and purposely mispronouncing her first name. It is a tactic Trump has also deployed against Fulton County District Attorney Fani T. Willis, the Black female prosecutor overseeing the Georgia criminal case against him for attempting to overturn the 2020 election.

“I’m running against a low I.Q. individual,” Trump said during a speech Saturday at a bitcoin conference.

Trump has mocked the appearance and intellect of men as well, including Sen. Marco Rubio (R-Fla.), who he nicknamed “Little Marco”; Sen. Jon Tester (D-Mont.), comparing his weight to that of a pregnant woman; and Sen. Ted Cruz (R-Tex.), who he called “Lyin’ Ted.” He has also repeatedly referred to Biden as a “low I.Q. individual.” But his broadsides against women have often carried greater political risk by alienating female voters who already find some of his rhetoric to be offensive.

Harris allies say that they are preparing to handle both overt and latent sexism and racism, and they recognize the challenges of trying to elect the first female president. But they also say that eight years after Trump first rained down belittling nicknames and cruel insults on Clinton — as well as just about any other woman who dared to criticize him — the playbook has become familiar and, especially in a post-Roe v. Wade world, has the potential to backfire.

Republicans and Trump allies, meanwhile, say they believe the most effective attacks on Harris are not personal invective but those that tie her to unpopular polices of the Biden-Harris administration and define her as an out-of-touch liberal from San Francisco, where she got her start in the district attorney’s office.

But they also worry that Trump and some of his more extreme supporters will be unable to refrain from deploying sexist and racially fraught language, which they fear will hurt him with crucial voting blocs. Already, House Republican leaders, including House Speaker Mike Johnson (R-La.), have admonished their members not to attack Harris because of her race and overall identity after several Republican lawmakers dismissed her as the “DEI candidate,” using the acronym for “diversity, equity and inclusion.”

Trump’s new vice-presidential nominee, Sen. JD Vance (R-Ohio), has also come under attack from Democrats for saying in 2021 that Democrats without children should not control government and characterizing many Democratic women, including Harris, as “childless cat ladies who are miserable.” (Harris has two stepchildren.)

“They’ve got to be careful how they’re coming after the first Black female nominee, because they’re already doing badly with women, and abortion is already a huge issue,” said Jennifer Palmieri, the communications director on Clinton’s 2016 campaign. “If they take it too far, that’s going to alienate a lot of voters.”

Still, she added, Harris and Democrats will need to deftly parry any attacks, especially given that women and people of color still often face additional hurdles as candidates.

“In 2024 America, voters do not want to consciously hold women back, but all of us have subconscious race and bias questions in our heads that make us have doubts about female candidates that we don’t have about male candidates,” Palmieri said.

The former president has centered many of his early attacks on Harris on the nation’s border with Mexico, dubbing her “the border czar” — though President Biden tasked his vice president with a narrower role addressing the root causes of migration out of Guatemala, El Salvador and Honduras and not with dealing with the surge of migrants at the border. In a press call this past week, Trump falsely claimed that Harris “supports mass amnesty” and “will make the invasion exponentially worse,” a reference to illegal border crossings. (Illegal crossings, which rose to record levels during President Biden’s term, have declined more than 50 percent in recent weeks after Biden used emergency measures to limit asylum access.)

Trump and his campaign are also expected to focus on Harris’s background in San Francisco and California politics, as well as her unsuccessful 2020 presidential campaign. During the press call, Trump described Harris as “much more radical” than Biden and claimed she was “decimated in the debates.” He also reprised his use of the word “nasty” to describe the California Democrat.

“She was by far the nastiest to Joe Biden,” Trump said. “She played the race card at a level that you rarely see and she really was very nasty to him, and then he picked her.”

During the 2020 presidential cycle, Trump falsely questioned whether Harris was eligible to be Biden’s vice president because her parents weren’t U.S. citizens when she was born — an echo of his previous racist “birther” attacks on former president Barack Obama. Trump deployed a similar attack on Haley, whose parents are Indian immigrants, during the 2024 Republican primary.

And campaigning in Florida less than a month before Election Day in 2020, Trump told the crowd, “Kamala will not be your first female president.”

“Look, we’re not going to be a socialist nation,” he said at the time. “We’re not going to have a socialist president — especially a female socialist president.”

Asked about the Republican leaders’ edict not to attack Harris on her identity, Trump spokesman Steven Cheung — speaking to reporters at a Wednesday rally in North Carolina — offered a response that seemed to underscore both the Republican hope (that Trump will stay focused on the issues) and the more likely reality (that Trump may attack Harris in personal and offensive terms): “I don’t know that it’s off-limits, but it’s not something we’ve done.”

In a statement, Trump campaign spokeswoman Karoline Leavitt criticized Harris as “just as weak, failed and incompetent as Joe Biden — and she’s also dangerously liberal.”

“Not only does Kamala need to defend her support of Joe Biden’s failed agenda over the past four years, she also needs to answer for her own terrible weak-on-crime record in California,” Leavitt wrote. “A vote for Kamala is a vote for more crime, inflation, open borders, high gas prices, and war around the world, and our team will make sure every American knows it.”

The Harris campaign and Democrats so far have largely tried to dismiss the attacks and have responded with humor, arguing that the dynamic has changed since Trump first emerged on the political scene. In one press release the Harris campaign blasted out Thursday in response to a Trump appearance on Fox News, they referred to Trump as “a 78-year-old criminal” and said one of their key takeaways was “Trump is old and quite weird?”

In another Thursday release, they cheekily wished a “Happy World IVF Day to everyone except JD Vance,” attacking Trump and his running mate for “demeaning women’s choices and their freedoms” — another indication of how Harris plans to prosecute the case against Trump not just as a felon, but over issues of reproductive rights and democracy.

“When Trump started calling her ‘Laughing Kamala,’ I said, ‘Oh my God, he can’t use that as his moniker.’ … The problem is he’s the biggest laughingstock in the world, so he can’t use that,” said Donna Brazile, a Democratic strategist who is close to Harris. “I don’t think we should spend any time worried about what nickname he gives the vice president of the United States. It’s what he has done to the women of the United States.”

There is also a growing sense on the Democratic side that the landscape has shifted since 2016, and that the playbook that worked against Fiorina and Clinton is no longer quite as effective. The party now has a better sense of how to respond, they argue, and voters have also repeatedly shown a backlash when faced with overtly offensive — as well as MAGA extremist — attacks.

Trump beat Haley in this year’s Republican primary, but he also struggled afterward to consolidate support in the suburbs — the result, some operatives speculate, of how he went after Haley.

Trump has a long history of problematic behavior involving women that transcends how he treats female opponents. Since the 1970s, more than two dozen women have accused Trump of sexual misconduct, including assault, and during the 2016 campaign, an “Access Hollywood” video emerged of Trump boasting about forcibly grabbing women without their consent. In May of last year, a New York jury found Trump liable for sexually abusing E. Jean Carroll, and this May, another New York jury found Trump guilty of 34 felony counts in a hush-money trial involving payments to adult-film actress Stormy Daniels, who claimed she and Trump had sex. Trump has denied any wrongdoing and said all the allegations are false.

A New York Times/Siena College poll from early July found that 52 percent of registered voters said Trump does not respect women “much” or “at all” — a number higher among women themselves, with 60 percent of female voters saying Trump does not respect women. And a CNN poll after Biden dropped out of the race found that Harris outperforms Trump with female voters 50 percent to 45 percent, as well as with moderate voters, 51 percent to 44 percent.

A person who worked on Fiorina’s 2016 campaign, speaking on the condition of anonymity to talk about private interactions on the campaign, said that while female candidates still encounter bias, there are ways to capitalize on attacks to appeal to female voters.

The person said that while the younger women on Fiorina’s staff were shocked by Trump’s attack on her looks, Fiorina took a different approach.

“She was like, ‘Yeah, ladies, this is what my life has been like since I walked on the engineering floor at AT&T,’” the person said.

Democratic lawmakers agree.

“In many ways, having gone through this with multiple women now on the ticket running for president, I think we’ve built the muscle,” Rep. Ayanna Pressley (D-Mass.) said. “We’ve learned the lessons, we’ve built the muscle. We know that these attacks will be coming, and we’ll be better prepared.”

Former House speaker Nancy Pelosi (D-Calif.) said that Trump’s petty attacks are best “ignored,” in part because he “always is projecting,” and instead urged her party to focus on its vision of the future.

“With Hillary, he was calling her ‘Crooked Hillary.’ He’s crooked. Me — he’s called me ‘Crazy Nancy.’ He’s crazy. ‘Nervous Nancy.’ He’s nervous,” Pelosi said. “So I think it’s about what we have to offer. He’s bankrupt in terms of ideas, in terms of connecting with America’s working families. So he has to resort to these projections of his own weakness.”

Harris and Trump, then, face different challenges. Harris allies say she still remains relatively unknown and that, especially as a woman, she needs to tell her own story to voters, underscoring her experience and qualifications.

“She should spend the next three weeks introducing herself to the American people,” Palmieri said. “You’ve got to be aware of what people need to hear about women leaders — women leaders constantly need to be credentialed.”

Trump, meanwhile, needs to stay focused on the issues, Republicans say.

“In an even more politically fraught environment than the ones in which he ran against Haley and Clinton, President Trump has to be careful to try to stay as policy-focused as possible, such as on the border, the costs of goods and services and the like,” Rob Godfrey, a former Haley aide, said.

But Democrats are betting — and Republicans fear — that Trump and some of his far-right supporters may not be able to resist attacking Harris with racist and sexist undertones.

“He will do it — he can’t help himself,” Rep. Maxine Waters (D-Calif.) said. “He will say terrible things. He will make up things.”

A person familiar with the Trump campaign’s thinking, speaking on the condition of anonymity to share candid views, was blunt: “We hope he doesn’t act like a crazy racist and sexist person, but we can’t control him. There are probably dog whistles and racist and sexist tropes he’ll stumble into. His campaign is going to try to keep him out of that rhetoric, but it’s going to be difficult.”

In the past, Trump has unleashed some of his harshest invective on women of color.

In 2019, during a fight with House Democrats, Trump tweeted that “The Squad” — a group of female lawmakers of color — should “go back” to the “crime infested places from which they came.” He described Waters, who is Black, as “low IQ Maxine Waters” in a speech, and in a tweet attacked her as “an extraordinarily low IQ person.” And over the course of three days in 2018, Trump demeaned three different Black female reporters, dismissing one as a “loser” and telling another, “You ask lot of stupid questions.”

After Harris’s 2020 debate with Vice President Mike Pence, Trump called her a “monster” and a “disaster.”

Still, Democrats say they are cautiously optimistic that Harris may be able to avoid, or at least overcome, some of the traps that ensnared Trump’s past female opponents.

“We’ve learned a lot, we’ve learned how he operates, how he throws red meat in terms of anti-women rhetoric to his base,” Aimee Allison, founder of “She the People,” said. “Most people have not been able to stand up to the way that Trump has built power, but I think in Kamala Harris, with her unique strengths as a prosecutor and all of her experience and who she brings with her in this campaign, he’s going to have a hard time.”

Emily Guskin contributed to this report.

This post appeared first on washingtonpost.com