LAS VEGAS — At the final debate of a historic presidential campaign, Donald Trump on Wednesday held fast to an unprecedented break with U.S. political tradition, casting doubt on whether he would concede the election should he lose.

“I will look at it at the time,” Trump said, even as moderator Chris Wallace stressed the vaunted place of the peaceful transfer of power in American democracy.

But the election process itself has in recent weeks become a central theme of Trump’s campaign.

He has repeatedly asserted, without citing specifics, that the election could be “rigged” by Hillary Clinton, the media, and vast voter fraud. From the debate stage, he speculated that “millions of people” are on state voting rolls who should not be eligible to cast ballots.

Clinton characterized Trump’s stance as “horrifying.” But being horrified was not the same thing as being unprepared — and she pounced on what she considered a trap that Trump had set for himself.

“You know, every time Donald thinks things are not going in his direction, he claims whatever it is, is rigged against him,” she said. “The FBI conducted a year-long investigation into my emails. They concluded there was no case; he said the FBI was rigged. He lost the Iowa caucus. He lost the Wisconsin primary. He said the Republican primary was rigged against him. Then Trump University gets sued for fraud and racketeering; he claims the court system and the federal judge is rigged against him. There was even a time when he didn't get an Emmy for his TV program three years in a row and he started tweeting that the Emmys were rigged against him.”

Trump, either playing to type, or perhaps as a humorous aside, did his best Alec Baldwin imitation — of Baldwin playing Trump. When Clinton mentioned the business about the Emmys, the real Trump leaned into his microphone and said, “Should have gotten it.”

On a more serious note, Trump has previously urged his followers to reject the results of an election: In 2012, Trump called for a “revolution” after President Obama won re-election against Mitt Romney. But the Republican nominee’s remarks Wednesday suggested he could raise such objections from a platform of much greater authority.

The exchange at the final debate, hosted by the University of Nevada, Las Vegas, marked a dramatic finish to an election that has challenged the conventions of American politics — from expectations of civility and rhetoric to qualities voters demand of candidates for the presidency.

Although Clinton’s rhetoric about Trump — even to his face — has been uncommonly harsh, Trump has repeatedly raised the ante. And so it was again Wednesday, as he publicly rejected an assessment by the intelligence community that Russia has sought to influence U.S. elections by hacking the Democratic National Committee and others.

“Our country has no idea” who is behind the hacks, Trump said, although he has received classified briefings saying otherwise as a candidate for president. Pressed by Wallace whether he would “condemn” interference by a foreign state in the election, however, Trump said he would.

Clinton has sounded the alarm over Russia’s meddling, in part to draw attention away from information that has been released as a result, including emails by her campaign chairman, John Podesta. One email contained an excerpt from a paid speech by Clinton in which she supported “a hemispheric common market, with open trade and open borders.”

But Trump, faced anew with charges by Clinton that he has been too friendly to Russian President Vladimir Putin, also would not back away from those remarks. “She doesn’t like Putin because Putin has outsmarted her every step of the way,” Trump said.

With less than three weeks until Election Day, and with absentee and early voting already underway in many states, the UNLV debate marked one final opportunity for the two nominees to bring their messages directly to millions of Americans.

But there was more pressure Wednesday night on Trump to shift the trajectory of a campaign that seems to be slipping away from him. Heading into the debate, Clinton led Trump by 6.5 percentage points in the RealClearPolitics polling average — a margin no previous presidential candidate has overcome at this late stage.

If Trump has hoped to shrink Clinton’s advantage, however, his message since the second debate has instead seemed tailored to his core supporters. At his rallies he encouraged chants of “Lock her up” as he called for Clinton to be prosecuted and jailed, and outlined a vast conspiracy to derail his campaign.

Trump has also faced allegations by nine women that he groped or kissed them without consent. Many of the women have told their stories publicly, including a former writer for People magazine.

Asked Wednesday about their accounts, Trump dismissed the stories as “fiction.” But Clinton also spotlighted Trump’s public responses to some of the charges, in which he suggested some of the women were not attractive enough to target.

“Donald thinks belittling women makes him bigger,” Clinton said.

Clinton has recently grown her support among women, with a Bloomberg News poll released Wednesday showing a 17-point advantage. But Trump has struggled to surpass Clinton among most other demographics, too, underscoring his urgent need to broaden his appeal beyond white men and working-class voters.

Trump did not introduce many new messages Wednesday in pursuit of that objective. At least at the beginning of the evening, he resisted entering into exchanging personal insults with Clinton, while focusing on his core policy messages, including immigration.

But the banner moment of the night will be remembered as one in which Trump contemplated defeat — and balked.

After the debate, Clinton aides cast Trump’s reluctance to commit to accepting the election results as evidence he lacks the temperament to lead the country. Speaking with reporters, Clinton Campaign Manager Robby Mook called it a “chilling preview” of what a Trump administration might look like. “Anyway, it’s not up to Donald Trump to determine the next president,” Mook added. “It’s up to the voters and the secretaries of state, most of whom are Republicans, to certify results. We have a lot of confidence in both.”

Trump surrogate Sean Spicer, fielding questions in a nearby scrum, tried to deflect the storyline of the night with puckish humor. Asked what would happen if Trump refused to accept the election, he smiled wanly. “When Trump wins, you mean?” Spicer replied. “I’m pretty sure he’ll accept that.”

Carl M. Cannon contributed to this story.