WASHINGTON — Hillary Clinton is the country’s most famous working mother. For 40 years, she’s been at the center of countless conversations about gender and politics. Even her pantsuits have been debated for decades.

With her at the top of the Democratic ticket, gender was always going to be an inescapable part of the presidential race.

Still, no one expected this.

In its final weeks, the 2016 campaign is awash in charges and countercharges of assault and groping, sexist slurs and graphic language.

Several women have accused Republican nominee Donald Trump of sexual misconduct and assault. The New York billionaire, meanwhile, has argued that Clinton “viciously” ”attacked” the women who said her husband, former President Bill Clinton, committed rape and sexual impropriety.

Trump supporters commonly wear T-shirts with slogans such as “Hillary sucks but not like Monica” and “Trump that Bitch.” At several Clinton rallies this past week, hecklers interrupted her speeches with shouts of “Bill Clinton is a rapist.”

Trump ended the week by pantomiming the descriptions of his alleged assaults, mimicking pawing at a women’s chest and reaching under a skirt.

It’s an election, Clinton said, that “makes you want to unplug the internet or just look at cat gifs.”

Her longtime supporters see the White House as nearly within their grasp. But the nasty tone of the contest has tempered their joy at shattering what Clinton once called the “highest and hardest glass ceiling.”

“It distracts from it enormously. Who ever dreamt this would be the way this campaign would turn out,” said Cynthia Friedman, who co-founded a Democratic National Committee effort to support women in politics with some help from Clinton in 1993. “Watching Hillary at the debate, I actually got almost physically sick to see somebody abused and spoken too so rudely to their face.”

Advocates worry that Trump’s impact goes beyond Clinton, and potentially could undo decades of progress on issues such as sexism and sexual assault by normalizing violence against women.

“Would there have been sexist mudslinging? Absolutely. But not like this,” said Nita Chaudhary, a founder of the women’s advocacy group UltraViolet. “We’ve made progress on rape culture and on sexism in the last two years ago. It feels like the Trump candidacy is undoing all of that.”

Some Republicans are equally dismayed, seeing Trump as a force that will alienate women from their party for years to come as polls indicate the political gender gap has reached historic levels.

This weekend, Clinton’s campaign is trying to capitalize on that divide, with events focused on contacting female voters, including Republicans.

“If Donald Trump had set as his mission the destruction of the Republican Party, it’s hard to imagine what he’d be doing differently,” said Sarah Isgur Flores, a Republican strategist and former deputy campaign manager to presidential hopeful Carly Fiorina. “It will be an uphill battle to win back all of the voters Trump is losing in this scorched earth campaign.”

From the moment Clinton began plotting her first run for president, her advisers debated how she should handle her gender. In 2008, Clinton largely ignored her history-breaking potential and focused on her experience, concerned about research showing resistance among voters to a female president.

More than a year before she officially announced her second run, Clinton’s future campaign manager Robby Mook wrote in an email, “Running on her gender would be the SAME mistake as 2008, ie having a message at odds with what voters ultimately want. Injecting gender makes her candidacy about HER and not the voters and making their lives better.”

Replied future campaign chairman John Podesta, “Gender will be a field and volunteer motivate but won’t close the deal.”

Podesta and Mook discussed the matter in a 2014 email exchange made public this past week by the WikiLeaks organization following the hack of Podesta’s emails. Clinton’s campaign has blamed the hack on Russia.

Clinton’s gender did become a part of her 2016 campaign message, with references to her roles as a mother and grandmother becoming a mainstay of her stump speech.

“I realize I might not be the youngest candidate in this race,” she’d often say during her primary campaign. “But with your help, I will be the youngest woman president.”

That message has been largely replaced by a broader pledge to be a president for all Americans, even those who do not support her candidacy. Aware of Clinton’s own unpopularity, her campaign is focused on giving voters a reason to back her, focusing on her policies and credentials.

“It’s been a high wire act for some time,” said Ann Lewis, a longtime Clinton adviser. “You have to deal with what’s happening, but this can’t take over the presidential campaign.”

While Clinton may be able to ignore Trump’s taunts, voters have not. The negative tone of the campaign has exasperated deep national divides, prompting anxiety across political lines about how Clinton and congressional Republicans can unite the country should she win the White House.

“I don’t know how long it’s going to take us to recover from this,” said Mary Deutmeyer, 70, a retired teacher from Iowa who cast her ballot early for Clinton on Wednesday. “It’s almost like walking in the gutter.”

That’s not a concern to Trump supporters such as Shelli Simontacchi, who attended a Trump rally Friday night in North Carolina. She stressed she didn’t condone or even like Trump’s language about women, but argued there are “bigger issues at stake.”

“It doesn’t mean you’re against women if you vote for Trump,” she said.

Associated Press writers Catherine Lucey in Des Moines, Iowa, and Jill Colvin in Charlotte, North Carolina, contributed to this report.

Follow Lisa Lerer on Twitter at: http://twitter.com/llerer