DES MOINES, Iowa — The nonaggression pact between Sen. Bernie Sanders of Vermont and Sen. Elizabeth Warren of Massachusetts faced its most difficult test and seemed to hold — at least for now.

In Tuesday night's debate, the two progressive senators de-escalated a tense round of tit-for-tat exchanges between their presidential campaigns over the charged issues of gender and electability.

But an icy moment at the end of the debate, when Warren appeared to refuse Sanders' handshake, suggests the wound may not have healed yet, even if both campaigns believe it is in their strategic interest to strike a detente.

Aides and supporters of both senators, who have more or less remained allies even while running against each other for the 2020 Democratic presidential nomination, had accused each other of dirty tricks and lying in recent days after a series of leaks to the media, culminating in Warren saying in a statement that Sanders once told her he didn't think a woman could win the presidency.

But when the topic came up Tuesday night, both sought to set the issue aside and move on, even as Sanders again denied telling Warren a woman couldn't win during a one-on-one meeting in 2018.

"I don't want to waste a whole lot of time on this, because this is what Donald Trump and maybe some of the media want," he said. "Anybody knows me knows that it's incomprehensible that I would think that a woman could not be president of the United States."

He went on to say that he had been ready to defer to Warren and not run for president if she had decided to do so in 2016, and said he would work to elect any of the candidates on stage should he fail to win the nomination this year.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Warren seemed happy to move on from Sanders, but acknowledged that many Democrats have serious doubts about whether Americans would elect a woman after Hillary Clinton's 2016 electoral college loss to President Donald Trump.

"I disagreed," Warren said of her thoughts on their reported 2018 discussion. “Bernie is my friend, and I am not here to try to fight with Bernie. But, look, this question about whether or not a woman can be president has been raised and it's time for us to attack it head on. And I think the best way to talk about who can win is by looking at people's winning record. So, can a woman beat Donald Trump?"

The issue of electability — an unknowable factor — has chased Warren since her first trip to Iowa just over a year ago as she has worked to persuade Democratic voters she can win against Trump. Many Democratic voters have said they believe that sexism does makes it harder for women to win than for men.

Warren's campaign is well aware of this challenge and has tried to find moments to push back on it, so Warren seemed happy on Tuesday to turn the Sanders spat into a chance to make the pitch herself.

Warren noted that the men on stage had collectively lost 10 elections while the two women — herself and Sen. Amy Klobuchar of Minnesota — had won every election.

"And the only person on this stage who has beaten an incumbent Republican anytime in the past 30 years is me," Warren added, referring to her 2012 victory over Republican Scott Brown, who won a special election in Massachusetts to fill Ted Kennedy's Senate seat.

Sanders pushed back on that claim, saying he wanted to "set the record straight" by noting he ousted an incumbent Republican to win a seat in Congress in 1990.

Warren smirked, before gently noting that she placed her timeline within 30 years. Sanders’ 1990 election is months short of being 30 years ago.

"Well, 30 years ago is 1990, as a matter of fact," he conceded.

And Warren took one more chance to try to dispel electability concerns, pointing out that many Democrats worried Americans wouldn't elect a Roman Catholic when the party nominated John F. Kennedy in 1960 and a black man in 2008 when its voters picked Barack Obama. And she noted that women helped power Democrats' House takeover in 2018.

The episode has been personal for both camps.

Sanders' team feels he has been unfairly and inaccurately accused of sexism while Warren's allies took special offense to Sanders' campaign manager going on TV to say her recollection of events was a "lie."

That tension seemed evident between the candidates themselves after the debate concluded and Sanders crossed the stage to try to shake Warren's hand. She moved her hand away, and then told him something, which was not picked up on the microphones and which both campaigns have so far declined to reveal.

Another candidate, billionaire Tom Steyer, happened to be standing nearby during the awkward moment, but wanted no part of the drama when asked about it later by MSNBC's Chris Matthews.

"I don’t know what they were saying,” he said. “Whatever was going on I was trying to get out of the way as fast as possible.”