DES MOINES, Iowa — Democratic presidential candidates covered familiar ground on health care and foreign policy in their final debate before the crucial Iowa caucuses, but they found themselves on more charged territory as they discussed whether a woman could win the nation's highest elected office.

Six top contenders met Tuesday in a historic recital hall at Drake University in Des Moines three weeks before Democrats in the state hold the first contest of the primary.

Expectations were high for a showdown between Sens. Bernie Sanders and Elizabeth Warren, following a recent report by CNN that Sanders told Warren in a 2018 private meeting that a woman couldn't be elected president. The Sanders campaign called the allegation a lie.

Onstage, Sanders denied saying the remark, pointed to a three-decade old video of him saying a woman could be president, and noted that Hillary Clinton won the popular vote against President Donald Trump by 3 million votes.

"How could anybody in a million years not believe that a woman could become president of the United States?" Sanders said. "And let me be very clear. If any of the women on this stage or any of the men on the stage, win the nomination — I hope that's not the case, I hope it's me — but if they do, I will do everything in my power to make sure that they are elected in order to defeat the most dangerous president in the history of our country."

Warren disagreed with Sanders' characterization but declined to needle him on stage. The two had long agreed not to attack each other, but that pact has appeared strained as Iowa's Feb. 3 caucus nears.

"Bernie is my friend and I am not here to try to fight with Bernie," Warren said, before pivoting to a broader question of a woman's electability and delivering the lines that got the biggest reaction of the night.

"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?" she said. "Look at the men on this stage: Collectively, they have lost 10 elections. The only people on this stage who have won every single election that they've been in are the women: Amy and me."

Sen. Amy Klobuchar of Minnesota piled on with a boast of her own: "Every single person that I have beaten, my Republican opponents, have gotten out of politics for good. I think that sounds pretty good with the guy we have in the White House right now."

Sanders and Warren gingerly sidestepped antagonistic confrontation elsewhere, even on topics such as trade policy where the two progressive allies have shown rare disagreement.

Warren said she supports the new North American trade deal, calling the update championed by Trump a "modest improvement."

"It will give some relief to our farmers. It will give some relief to our workers," Warren said. "I believe we accept that relief, we try to help the people who need help, and we get up the next day and fight for a better trade deal."

Sanders pushed back, arguing the proposal "will set us back a number of years.

Former Vice President Joe Biden chimed in with support for trade deals, framing them as necessary to prevent China from setting the rules for global trade.

"I don't know that there's any trade agreement that the senator would ever think made any sense," Biden said, of Sanders.

"Joe and I have a fundamental disagreement, in case you haven't noticed," Sanders said.

Sanders' tweaking of Biden carried over to foreign policy, where he revisited his long-running critique of Biden's vote to authorize the 2003 Iraq War.

"Joe and I listened to what Dick Cheney and George Bush and Rumsfeld had to say," Sanders said. "I thought they were lying. I didn't believe them for a moment. I took to the floor. I did everything I could to prevent that war. Joe saw it differently."

Biden acknowledged his 2003 vote was a "mistake" but countered, "the man who also argued against that war, Barack Obama, picked me to be his vice president. And once we were elected president ... and vice president, he turned to me and asked me to end that war."

International affairs took on new prominence in this debate — the seventh so far of the 2020 Democratic primary — spurred by heightened tensions with Iran after the U.S. killed a top Iranian general early this month in Iraq.

With the backdrop of a potential new conflict, the candidates laid out competing visions on the use of American military power throughout the world.

Biden said he would emphasize international coalitions to help guard against national security threats. But he rejected the prospect of pulling out troops entirely across the world, saying diplomacy has its limitations in dealing with terrorist groups such as Islamic State.

"They've come to us before. They'll come to us again," he said. "So it's a fundamental difference than negotiating with other countries. It's fundamentally the requirement that we use our special forces in small numbers to coordinate with other countries to bring together coalitions."

Warren, meanwhile, called for bringing combat troops home from abroad. Pointing to her post on the Senate Armed Forces Committee, she said she's heard a parade of generals claiming to have "turned a corner" in the nearly 19-year war with Afghanistan.

"We've turned the corner so many times, we're going in circles in these regions," Warren said. "This has got to stop. It's not enough to say some day we're going to get out."

Democrats spent considerable time on health care, a frequent topic in past debates. Once again, the more liberal candidates called for abolishing the private insurance system and creating "Medicare for All" and the moderates called for building on the Affordable Care Act.

Klobuchar, sounding slightly exasperated, said the argument was moot since there is not enough support in Congress, even among Democrats, to pass a sweeping overhaul.

"This debate isn't real," she said. "I was in Vegas the other day and someone said don't put your chips on a number ... that isn't even on the wheel."

Buttigieg said the health care system could be vastly improved by building on Obamacare rather than creating a new system that costs tens of billions of dollars, leading Warren to argue that he was calling for incremental change, not transformational change. The former mayor of South Bend, Ind., countered that his plan was not small.

"We've got to move past a Washington mentality that suggests that the bigness of plans only consists of how many trillions of dollars they (cost), that the boldness of a plan only consists of how many Americans you can alienate," he said.

Candidates were also asked about perceived vulnerabilities of their respective campaigns.

Tom Steyer, a billionaire who has spent more than $100 million of his own money on television advertising, was asked how voters would know anything about him except for his wealth.

He countered that he was a self-made man who built a multibillion-dollar global business and then walked away from it to focus on the environment.

Trump's "going to run on the economy," Steyer said. "Whoever beats Mr. Trump is going to have to beat him on the economy, and I have the experience and expertise to show he's a fake and a fraud."

Buttigieg was pressed over his lack of support from African American voters, a key Democratic constituency.

"The black voters who know me best are supporting me ...," Buttigieg said. "Now, the biggest mistake we could make is to take black votes for granted. And I never will. The reason I have the support I do is not because any voter thinks that I'm perfect. It's because of the work that we have done facing some of the toughest issues that communities can ... from poverty to justice and policing."

The Warren-Sanders peace pact seemed to withstand the two-hour debate, but as candidates filed off the stage, there were signs the truce may have frayed. Warren did not shake Sanders' outstretched hand after the meeting, and the two appeared to have a spirited conversation, instantly sparking speculation on social media and cable news about the state of their alliance.