Media playback is unsupported on your device Media caption Presidential debate: The moment Trump v Clinton turned nasty

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 Mr Trump calling Mrs Clinton a "nasty woman".

Polls show Mr Trump is losing in key battleground states after facing a slew of sexual assault allegations.

The final battle of wits came less than three weeks before election day on 8 November.

The candidates declined to shake hands before and after the political sparring, setting the tone for another debate marked by shouting and interrupting.

Mr 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.

Media playback is unsupported on your device Media caption Hillary Clinton: "He [Putin] would rather have a puppet as president"

In one of the more striking moments, Mr Trump twice declined to say whether he would accept the election's outcome, breaking with the country's long-standing tradition of a losing candidate's concession after the votes are counted.

"That's horrifying," Mrs Clinton shot back.

"He is denigrating and he is talking down our democracy. And I, for one, am appalled that somebody who is the nominee of one of our two major parties would take that kind of a position."

Mr Trump's response drew sharp criticism from Republican Senator Lindsey Graham, who said the candidate was "doing the party and country a great disservice by continuing to suggest the outcome of the election is out of his hands and 'rigged' against him," according to a statement.

Nicolle Wallace, an NBC News analyst and advisor to Senator John McCain's 2008 presidential campaign, said on NBC: "He may as well have laid down in his own coffin with a hammer and nail and pounded it in himself."

Democratic vice presidential nominee Tim Kaine also weighed in, saying Mr Trump's comments undermined American tradition and insulted "a very central premise of our democracy".

Mr Trump's campaign has insisted that the Republican candidate will accept the outcome if the results are verified.

"He's saying that until the results are actually known, certified and verified, he's not going to concede an election. He just doesn't know what will happen," said Kellyanne Conway, Mr Trump's campaign manager.

Other highlights from the debate at the University of Nevada, include:

Mrs Clinton said Mr Putin wants Mr Trump elected because he wants a puppet as US president

"We have some bad hombres and we are going to get them out," said Mr Trump, as he stood by his pledge to build a border wall

Mrs Clinton said she would introduce the biggest jobs programme since World War II

Mr Trump suggested she and President Barack Obama co-ordinated 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 White House helping to track down Osama Bin Laden, "he was hosting the Celebrity Apprentice", she said.

Not a good night for Trump - Anthony Zurcher, BBC News, Las Vegas

Donald Trump tried to be restrained. He really did. During the first section of the third presidential debate, when the topic was the Supreme Court, if you squinted you could almost imagine that this was just another presidential race, with two candidates squaring off and vigorously discussing their public policy positions on abortion and gun control.

To read the rest, go to Anthony's blog

Image copyright Getty Images Image caption Donald Trump was joined by his family after the debate ended

What the US media says

Many agree that the headline-grabbing moment of the debate was when Donald Trump said he would not commit to accepting the result of the election.

The right-leaning Fox News said it had been Mr Trump's "strongest debate performance" so far and felt he was "evenly matched" with Clinton. "But Trump may have undone whatever progress he made with a single answer," about the result, which will "undoubtedly be the big headline coming out of the debate and will dog Trump between now and Election Day".

Even readers of Breitbart News, a strong supporter of Mr Trump, thought he had failed to turn things around for himself. In a readers' poll, of 172,550 people who voted, 58% said Mrs Clinton won the debate compared with 41% for Mr Trump.

The Washington Post agreed with Fox that Mr Trump started well, but "by the end, it was the story of Trump in Campaign 2016 in microcosm, a series of angry exchanges, interruptions, insults that served to undercut the good he might have accomplished earlier".

The New York Times was full of praise for Mrs Clinton's performance, saying she "outmanoeuvred Mr Trump with a surprising new approach - his. Flipping the script, she turned herself into his relentless tormentor, condescending to him repeatedly and deploying some of his own trademark tactics against him".

What happens next?

A mere 24 hours after their final debate, Hillary Clinton and Donald Trump will come face-to-face again, at a white-tie gala at the annual Alfred E. Smith Memorial Foundation Dinner in New York. Both will make speeches, with tradition dictating the candidates deliver humorous remarks poking fun at themselves and each other, which could be awkward, given how ugly the campaign has become. The bitter rivals will sit one seat apart, with New York's Cardinal Timothy Dolan in the middle.

The two candidates will spend the remaining 18 days before the election criss-crossing the US in their bid to persuade undecided voters. Expect to see lots of appearances in battleground states such as Ohio, North Carolina, Florida and Pennsylvania.

Voters will go to the polls on Tuesday 8 November to decide who becomes the 45th President of the United States

The new president will be inaugurated on 20 January 2017

Mr Trump has faced damaging fallout after a video emerged of him making obscene comments about groping women, with senior Republicans deserting him.

When pressed about sexual assault allegations made against him by several women in the wake of the video, Mr 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.

More on the US election

Polls suggest Mrs Clinton is ahead nationally and in key battleground states.