Republican Donald Trump, addressing a crisis that has engulfed his campaign, said in Sunday night's nationally televised debate that he was "embarrassed" by his crude sexual comments on a recently released recording but that Bill and Hillary Clinton had acted worse as he was pressed.

Democratic nominee Hillary Clinton responded that the video proves he is unfit to serve as president.

The lines of attack began early in the year's second presidential debate, an ugly confrontation tinged by deeply personal attacks rarely, if ever, seen at this level of politics. Clinton said the video shows Trump's true character, while he boasted that if he is elected she will end up in jail.

The debate, done in a town-hall format with questions from audience members, was dominated early on by questions about a 2005 video in which Trump lewdly bragged about having license to aggressively kiss and grope women.

"Certainly I'm not proud of it," Trump said. But he dismissed it as "locker-room talk" and added that former President Bill Clinton was "far worse."

"Mine were words and his were action. There's never been anybody in the history of politics in this nation that's been so abusive to women," Trump said. "Bill Clinton was abusive to women. Hillary Clinton attacked those same women and attacked them viciously."

Hillary Clinton said Trump's true character had been proven by the video, as well as a track record of insulting comments toward other women, Muslims, immigrants, and many others.

"Yes, this is who Donald Trump is," Clinton said. But for the country, she continued, "this is not who we are."

The tension in the second of three presidential debates was obvious from the start: The candidates both smiled as they walked on stage at Washington University in St. Louis but pointedly did not shake hands.

They sniped at one another from then on.

Trump entered the event needing a significant turnaround after a disastrous stretch that began with a rambling performance in the first presidential debate, Sept. 26 and peaked Friday with the release of the 2005 video.

His poll numbers were already tumbling, but the tape appeared to be a breaking point. It sparked desertions from Republican officials across the country, including at least three congressmen from the Philadelphia area, who reacted with disgust and disavowed Trump's candidacy.

Analysts reacting instantly on Twitter argued that Trump's performance might have stabilized the candidate among his base - and thrilled hard-core Republicans - but questioned whether the performance would win over the moderate voters he needs to close ground in key polls.

Clinton, however, did not seem to be able to score the kind of decisive victory that could bury Trump after his weeks of turmoil and was put on the defensive at several points.

An aggressive Trump, repeatedly interrupting Clinton and accusing the moderators of favoring the Democrat, appeared more focused on pressing the case against her, as opposed to the first debate, when he was baited into damaging answers.

If elected, he threatened, he would jail Clinton over her handling of her email server when she was secretary of state.

"If I win, I am going to instruct my attorney general to get a special prosecutor to look into your situation, because there has never been so many lies, so much deception," Trump said.

Clinton responded by again apologizing for how she handled the server but said there was no evidence it had been hacked or that classified material "ended up in the wrong hands."

"It's just awfully good that someone with the temperament of Donald Trump is not in charge of the law in our country," she said.

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

Trump threw a smoke bomb into the mix shortly before the debate, appearing at a news conference with four women who long claimed to have been abused or mistreated by Bill or Hillary Clinton.

One, Juanita Broaddrick, repeated her long-standing accusation that Bill Clinton raped her in 1978.

The Clintons have long denied the claim, and no charges were ever brought.

Trump spent much of the night accusing Clinton of being ineffective during her decades in public life and showing "poor judgment," particularly by voting for the Iraq War (which Trump initially said he supported, though he denies that now).

She said she was proud of her record.

Trump, however, may have also added fuel to other controversies, appearing to confirm he had used a business loss to avoid paying years of federal income taxes.

"Of course I do. Of course I do," he said in response to a question about whether he did so. "And so do all of her donors, or most of her donors."

Later, asked about his tweet attacking a Hispanic beauty queen, he said, "I'm not unproud of it."

Trump also broke sharply with his running mate, Mike Pence, on policy toward Syria. While Pence, in a debate last week, called for using the U.S. military to intervene there, Trump flatly dismissed the idea.

"He and I haven't spoken, and I disagree," Trump said.

Clinton said she would oppose using American ground forces in Syria, and instead called for using special forces, training resistance fighters, targeting ISIS leaders and potentially arming Kurdish forces.

The debate did end on a note of grace. Asked by an audience member about something they admired in their rival, both candidates had kind answers.

"I respect his children," Clinton said. "His children are incredibly able and devoted, and I think that says a lot about Donald."

Trump said, "She doesn't quit, she doesn't give up. I respect that."

They shook hands at the end.

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