(CNN) -- How did Donald Trump defend his lewd and sexually aggressive comments against women in the second presidential debate? ISIS.
It's perhaps the first time the extremist group that has waged terror across the globe has been evoked to answer a question about a hot mic sex tape.
But ISIS wasn't the only global threat the presidential candidates tackled in their vitriolic back and forth that had both US audiences and non-Americans captivated.
Here's the key moments in a debate that laid bare the candidates' stark foreign policy differences.
Trump answered a question from Anderson Cooper about the vulgar language he was caught on tape using a decade ago with a rant about ISIS, mentioning the group at least five times.
"Yes, I'm very embarrassed by it. I hate it. But it's locker room talk, and it's one of those things. I will knock the hell out of ISIS. We're going to defeat ISIS. ISIS happened a number of years ago in a vacuum that was left because of bad judgment. And I will tell you, I will take care of ISIS."
He went on:
"We have a world where we have ISIS chopping off heads and where you have frankly.. drowning people in steel cages. Where you have wars and horrible, horrible sights all over. When you have so many bad things happening. It's like medieval times."
"They look and they see it. Can you imagine the people frankly doing so well against us with ISIS and then look at our country and see where it's going."
"Yes, I'm very embarrassed by it but it was locker room talk and one of those things."
'I know nothing about Russia'
Clinton slammed Trump over his alleged ties to Russia amid reports that the Kremlin was behind the hack of Democratic National Committee emails.
"We have never in the history of our country been in a situation that an adversary has been working to influence the outcome of the election. And believe me, they are not doing to get me elected, they're doing it to try and influence the election for Donald Trump," Clinton said.
Trump responded: "She doesn't know if it's Russian's doing the hacking; maybe there is no hacking."
"They think they're trying to tarnish me with Russia. I know nothing about Russia."
"I know about Russia but I know nothing about the inner workings of Russia. I don't deal there, I have no businesses there, I have no loans from Russia,' he continued.
CNN fact checkers say while there's evidence that Russia is behind the hack, Clinton's assertion that it was done to support Trump was just a hunch.
What to do about Syria
Trump's split with his running mate Gov. Mike Pence over the possible use of military force in Syria shocked many.
In Tuesday's vice presidential debate, Pence said he felt the US ought to establish safe zones and meet Russian "provocations" with strength, backing the use of military force if necessary.
"He and I haven't spoken, and he and I disagree," Trump said at Sunday's debate.
Clinton also categorically said she wouldn't put US troops on the ground in Syria. Instead, she favors arming the Kurds and targeting ISIS leader Abu Bakr al-Bagdhadi.
Russia, Iran 'killing ISIS'
US policy toward Syria generated one of the most heated and substantive exchanges on foreign policy.
Clinton said that Russia "isn't interested in ISIS" and its assault on Aleppo was aimed at destroying Syrian rebels opposed the regime led by Bashar al-Assad.
It was an assessment Trump fiercely disagreed with:
"I don't like Assad at all, but Assad is killing ISIS. Russia is killing ISIS. And Iran is killing ISIS. And those three have now lined up because of our weak foreign policy," Trump said.
CNN fact checkers rated Trump's claim as false.
How stupid is our country?
Trump slammed US military strategy in Iraq in a response to questions about his plan for Syria and the humanitarian crisis in Aleppo.
He zoned in on the plan for an upcoming assault on Mosul, a key ISIS stronghold.
"They think a lot of ISIS leaders are in Mosul," he said. "So we have announcements coming out of Washington, coming out of Iraq; we will be attacking Mosul in three or four weeks while all of the bad leaders from ISIS are leaving Mosul.
"Why can't we do it quietly? Why can't they do the attack, make it a sneak attack."
"How stupid is our country?"
China has been a favorite campaign trail punching bag of Trump but the country was little mentioned, save for one late exchange over the effects of cheap Chinese steel imports.
"It's killing our steel workers and our steel companies," said Trump.
Clinton shot back: "China is illegally dumping steel in the United States and Donald Trump is buying it to build his buildings, putting American steel workers and plants out of business."