Republican Donald Trump has refused to commit to accepting the election result if he loses, in the final TV debate against Hillary Clinton.
“I will tell you at the time,” he told moderator Chris Wallace. For days he has claimed the election is “rigged”.
The Las Vegas debate continued the campaign’s bitter tone, with Trump calling Mrs Clinton a “nasty woman”.
Polls show Trump is losing in key battleground states after facing a slew of sexual assault allegations.
The final battle of the wits came less than three weeks before election day on November 8, when most Americans will cast their vote.
The candidates declined to shake hands before and after the political sparring, setting the tone for what would later become yet another debate marked by shouting and interrupting.
Trump appealed to the Republican establishment by vowing to appoint Supreme Court justices with a “conservative bent” who would overturn a key ruling that made abortion legal in the US and protect gun rights.
He also stuck to his pledge to deport undocumented immigrants and secure US borders.
Meanwhile, Mrs Clinton firmly declared she would stand up for the LGBT community, defend abortion rights, focus on restoring the middle class and equal pay for women.
“The government has no business in the decisions that women make,” she said.
Other highlights from the debate at the University of Nevada, include:
*Mrs Clinton says Putin wants Trump elected because he wants a puppet as US president
*”You’re the puppet!” Trump fired back, adding that Putin had “outsmarted” and “outplayed” the former secretary of state
*Mrs Clinton said Trump “choked” when he met with Mexican President Enrique Pena Nieto about his plan to build the wall, but he insisted it would happen under his presidency
*”We have some bad hombres and we are going to get them out,” he said
*Trump suggested Mrs Clinton and President Barack Obama coordinated the violence at his rally in Chicago earlier this year
When asked about her paid speech to a Brazilian bank in which she spoke of her dream of open trade and open borders, Mrs Clinton said she was talking about energy policy.
In one key exchange, he attacked her 30 years of “very bad experience” and she responded by going through her timeline, comparing where she was to where Trump was.
While she was in the Situation Room helping to take out Osama Bin Laden, “he was hosting the Celebrity Apprentice”, she said.
Trump has faced damaging fallout after a video emerged of him making obscene comments about groping women, with senior Republicans deserting him, reports the BBC.
When pressed about sexual assault allegations made against him by several women in the wake of the video, Trump said the claims had been “largely debunked”.
In addressing the groping accusations, Mrs Clinton said: “Donald thinks belittling women makes him bigger”.
“Nobody has more respect for women than I do,” Trump said as the crowd was heard scoffing.
He also blamed Mrs Clinton, whose campaign he said was responsible for drumming up the allegations.
In recent days Trump has railed against the election process itself, warning the vote is “absolutely rigged” with “large-scale voter fraud” taking place.