LAS VEGAS (AP) — Threatening a fundamental pillar of American democracy, Donald Trump refused to say Wednesday night that he will accept the results of next month’s election if he loses to Hillary Clinton. The Democratic nominee declared Trump’s resistance “horrifying.”

Trump has spent the days leading up to third and final presidential debate warning voters that the election will be “rigged.” Asked whether he would accept the outcome if Clinton emerges victorious, he said, “I will tell you at the time. I’ll keep you in suspense.”

That contradicted pledges by his running mate, Indiana Gov. Mike Pence, as well as his daughter, Ivanka.

Wednesday’s contest quickly shifted from a calm, policy-focused faceoff into a bitter and deeply personal confrontation. Trump repeatedly called Clinton a “nasty woman,” while the Democrat panned him as “unfit” to be commander in chief.

NOW: Hillary Clinton and Donald J. Trump take the stage for the third and final presidential debate.

Clinton, who began the debate with a lead in nearly all battleground states, forcefully accused Trump of favoring Russia’s leader over American military and intelligence experts after the Republican nominee pointedly refused to accept the U.S. government’s assertion that Moscow has sought to meddle in the U.S. election.

She charged that Russian President Vladimir Putin was backing Trump because “he’d rather have a puppet as president of the United States.”

Trump denied any relationship with Putin and said he would condemn any foreign interference in the election. But he notably declined to back the intelligence community’s assessment that Russia was involved in the hacking of Democratic organizations. The Clinton campaign has said the FBI also is investigating Russia’s involvement in the hacking of a top adviser’s emails.

The 90-minute contest in Las Vegas came just under three weeks before Election Day and with early voting underway in more than 30 states. Trump has struggled to expand his support beyond his most loyal backers and must reshape the race in its closing days if he hopes to defeat Clinton.

The candidates clashed repeatedly over their drastically different visions for the nation’s future. Trump backed Supreme Court justices who would overturn the landmark Roe vs. Wade ruling, while Clinton vowed to appoint justices that would uphold the decision legalizing abortion, saying, “We have come too far to have that turned back now.”

The businessman entered the final debate facing a string of sexual assault accusations from women who came forward after he denied in the previous contest that he had kissed or groped women without their consent. That Trump denial followed the release of a video of in which he’s heard bragging about exactly that.

Clinton said Trump “thinks belittling women makes him bigger. He goes after their dignity, their self-worth.” She avoided answering a question about her husband’s infidelities.

Trump pressed Clinton on immigration, accusing her of wanting an “open borders” policy, a characterization she vigorously disputes. The Republican, who has called for building a wall the length of the U.S.-Mexico border, said that under a Clinton presidency, “People are going to pour into our country.”

Clashing on trade, Trump said Clinton had misrepresented her position on the Trans-Pacific Partnership, noting that she had originally called it the “gold standard” of trade agreements. Clinton shot back that once the deal was finished, it didn’t meet her standards. “I’ll be against it when I’m president,” she said.

On foreign policy, Clinton reasserted her opposition to sending a large-scale U.S. troop presence to the Middle East to defeat the Islamic State. She’s backed a no-fly zone in Syria, which would mark an expansion of the current U.S. strategy.

For Trump, the debate marked one of his final chances to reshape a race that appears to be slipping away from him. Clinton’s campaign is confidently expanding into traditionally Republican states, while Trump’s narrow electoral path is shrinking.

Clinton has struggled throughout the campaign to overcome persistent questions about her honesty and trustworthiness. In the campaign’s closing weeks, she’s begun appealing to Americans to overcome the deep divisions that have been exacerbated by the heated campaign, saying on stage Wednesday that she intended to be a president for those who vote for her and those who do not.

Clinton faced debate questions for the first time about revelations in her top adviser’s hacked emails that show her striking a different tone in private than in public regarding Wall Street banks and trade. She quickly turned the discussion to Russia’s potential role in stealing the emails.

Underscoring the deep discord between Trump and Clinton, the candidates did not shake hands at the beginning or end of the debate.