In a debate brimming with tension, Hillary Clinton declared Donald Trump's aggressively vulgar comments about women revealed "exactly who he is" and clearly demonstrated his unsuitability to be president. Firing back, Trump accused Clinton of attacking women involved in her husband's extramarital affairs and declared she would "be in jail" if he were president.

Trump entered Sunday night's debate in St. Louis desperate to steady his floundering campaign. He unleashed a barrage of attacks and insults, and continually interrupted Clinton. He repeatedly called her a "liar," labelled her the "devil" and contended she had "tremendous hate in her heart."

Trump acknowledged for the first time that he had paid no federal income taxes for many years.

The debate was the culmination of a stunning stretch in the race for the White House, which began with the release of a new video in which Trump is heard bragging about how his fame allowed him to "do anything" to women. Many Republicans rushed to revoke their support, with some calling for him to drop out of the race.

Trump again calls video 'locker-room talk'

Answering for his words for the first time, Trump denied that he had ever kissed and grabbed women without their consent. He said repeatedly that his words in 2005 were merely "locker-room talk" and paled in comparison to what he called Bill Clinton's abuse of women.

"She should be ashamed of herself," Trump declared. Ahead of the debate, the businessman met with three women who accused the former president of sexual harassment and even rape, then invited them to sit in the debate hall.

Republican U.S. presidential nominee Donald Trump listens as Democratic nominee Hillary Clinton answers a question from the audience during their presidential town hall debate at Washington University in St. Louis, Mo., on Sunday. (Rick Wilking/Reuters)

Bill Clinton never faced any criminal charges in relation to the allegations, and a lawsuit over an alleged rape was dismissed. He did settle a lawsuit with one of the women who claimed harassment.

On the debate stage, Clinton did not respond directly to Trump's accusations about her husband or her own role, but was blistering in her condemnation of his predatory comments about women in the tape released Friday.

"I think it's clear to anyone who heard him that it represents exactly who he is," she said, adding that she did not believe Trump had the "fitness to serve" as commander in chief.

The second debate was a town hall format, with several undecided voters sitting on stage with the candidates. The voters, all from the St. Louis area, were selected by Gallup.

In a brief scrum with reporters on her campaign plane Clinton said she wasn't surprised by the tone of the debate but was surprised "by the avalanche of falsehoods" Trump told.

She repeated her claim that Trump is not fit to be president and commander-in-chief.

Palpable tension

The tension between Trump and Clinton was palpable from the start of their 90-minute debate, the second time they have faced off in the presidential campaign. They did not shake hands as they met at centre stage.

Trump, who is several inches taller than Clinton, stood close behind her as she answered questions from the voters. At other times, he paced the stage, repeatedly interrupting her and criticizing the moderators.

But the businessman struggled to articulate detailed policy proposals, repeatedly dancing around questions about how he would replace President Barack Obama's health care law, a measure he has vowed to replace.

Donald Trump emphasizes a point in the town hall debate against Democratic nominee Hillary Clinton. (Saul Loeb/AFP/Getty Images)

Clinton's email server

The pair also clashed over Clinton's use of a private email server while she was secretary of state.

Clinton said she was "very sorry" for using the server, but she takes keeping classified information secret very seriously. She added there's been no evidence her actions led to classified materials winding up in the wrong hands.

Trump accused Clinton of lying, and said she improperly destroyed more than 30,000 emails that he said should have been turned over to law enforcement authorities. Trump said he was disappointed that Clinton had not been criminally charged.

Trump goes on the attack on emails and WikiLeaks 1:26

Clinton said, "You know it's just awfully good that someone with the temperament of Donald Trump is not in charge of the law in this country."

Trump shot back: "Because you'd be in jail."

The unprecedented break with U.S. political decorum nevertheless drew applause in a town hall-style debate that was supposed to be free of audience participation.

A few moments earlier, Trump had said he'd instruct his attorney general to appoint a special prosecutor who would investigate the tens of thousands of emails that Clinton deleted when she was secretary of state.

Trump said he disagrees with Pence

Trump made clear that he did not agree with running mate Mike Pence on how to deal with war-torn Syria.

Last week, Pence said that the U.S. military should be ready to strike Syrian military targets that are under the command of President Bashar al-Assad. The threat of military action against the Russia-backed Assad government marks a departure from Trump's preference for a focus on Islamic State targets.

Said Trump: "He and I haven't spoken and I disagree."

Trump stumbles on Syria question, says disagrees with running mate Pence 1:09

Trump's campaign was already struggling before the new video was released, due in part to his uneven performance in the first presidential debate. Many Republicans saw Sunday's showdown as his last best chance to salvage his campaign.

Clinton gets 'two-faced' question

It was unclear whether Trump's performance did anything to expand his support beyond his core backers. He did repeatedly cast Clinton as a career politician who had accomplished little during her years in Washington and would be incapable of bringing about change, one of his strongest arguments in a campaign that has highlighted American's deep frustration.

"With her, it's all talk and no action," Trump said.

The new revelations about Trump overshadowed potentially damaging revelations about Clinton's paid speeches to Wall Street firms. Emails released by Wikileaks last week showed Clinton told a group that it's acceptable for a president to project differing positions in public and private.

Republican presidential nominee Donald Trump and Democratic presidential nominee Hillary Clinton speak during the second presidential debate at Washington University in St. Louis, Sunday, Oct. 9, 2016. (Patrick Semansky/Associated Press)

Asked in the debate whether that's "two-faced," Clinton pointed to Abraham Lincoln, saying he did whatever he could to get the 13th Amendment passed, allowing emancipation of the slaves, by lawmakers who did not support African-American equality.

"I was making the point it is hard sometimes to get the Congress to do what you want them to do. That was a great display of presidential leadership."

Rolling his eyes, Trump said, "Now she's blaming the late, great Abraham Lincoln."

The third and final presidential debate is scheduled for Oct. 19 in Las Vegas.

Watch a repeat of Sunday night's U.S. presidential debate below:

Watch The Choice 2016 on the Passionate Eye on Sunday October 16 at 10 pm ET & PT on CBC News Network for new insights into Donald Trump and Hillary Clinton and why they both want one of the most difficult jobs imaginable.