“We’re not talking about isolationism, we’re talking about security. We’re not talking about religion, we’re talking about security.”

— Donald Trump

“If the San Bernardino facility was a target for terror, that means everywhere in America is a target.”

— Chris Christie

In this new, terrorism-focused phase of the presidential race, Tuesday’s Republican debate displayed wide gulfs among the candidates on how to protect the homeland and fight the Islamic State overseas.

It was a lively, substantive clash that included sharp and at times personal attacks on the dark subjects of war and terror.

Donald Trump’s proposal to ban all Muslims from entering the country — though polls show it is popular among GOP primary voters — was seconded by no one among the other eight candidates on the main stage, or the four who debated earlier in the evening. He was challenged most directly by former Florida Gov. Jeb Bush, seeking to revive a dragging campaign with a feisty performance.

U.S. Sens. Marco Rubio and Ted Cruz, jockeying for position behind Trump as they climb in the polls, clashed repeatedly on National Security Agency snooping, American entanglements overseas and immigration.

New Jersey Gov. Chris Christie and Kentucky U.S. Sen. Rand Paul got snippy on war in Syria.

The candidates gathered at a theater at the Venetian casino on the glittering Las Vegas Strip for the final debate of a rollicking 2015 that saw the unexpected rise of Trump. But this debate had a different feel than the previous four.

Terrorist attacks in Paris and San Bernardino, Calif., have occurred since the GOP candidates last debated, and just Tuesday morning, the entire Los Angeles Unified School District shut down for the day because of a threat. Polls show terrorism fears rocketing to the top of voters’ concerns, and the candidates sought to address them in varying ways.

Trump was defensive on his Muslim ban.

“We’re not talking about religion,” he said. “We’re talking about security. Our country is out of control.”

“Donald, you know, is great at the one-liners, but he’s a chaos candidate, and he’d be a chaos president,” Bush replied. “He would not be the commander-in-chief we need to keep our country safe.”

Trump returned to his usual defense: the polls. After Bush told Trump he would not be able “to insult your way to the presidency,” Trump shot back: “I’m at 42 (percent) and you’re at 3.”

Trump also proposed to close down parts of the Internet “where we’re at war.” Paul said that would violate the First Amendment, saying it raises doubts whether Trump is a “serious candidate.”

Rubio and Cruz, who could well be the final two combatants for the nomination if Trump fades, went back and forth multiple times. Rubio tried to cast Cruz as insufficiently hawkish, while Cruz accused Rubio of being ineffective.

Cruz supported curtailing NSA phone metadata collection after the program was exposed in the Edward Snowden leaks.

Said Rubio: “We are now at a time when we need more tools, not less tools. And that tool we lost, the metadata program, was a valuable tool that we no longer have at our disposal.”

Cruz, meanwhile, pointed to Rubio’s support for intervention in Libya as an example of a foreign policy blunder.

“He has far too often supported Hillary Clinton and Barack Obama undermining governments in the Middle East,” Cruz said.

Rubio, who has seen his star rise as the pick of the establishment wing of the party moving forward, took fresh criticism for his support of a failed immigration bill that would have allowed a path to citizenship for those here illegally. Cruz repeatedly accused Rubio of siding with Obama and Sen. Charles Schumer, D-N.Y., over the GOP base.

The candidates fractured on whether Bashar al-Assad should be forcibly removed from power in Syria.

Rubio and Ohio Gov. John Kasich said Assad must go, while Cruz and Paul said they were concerned such a move would sow more instability.

Christie talked about imposing a no-fly zone in Syria, which could bring the U.S. into conflict with Russia.

Paul replied, “If you’re in favor of World War III, you have your candidate.”

Businesswoman Carly Fiorina, though she did toss one barb Trump’s way comparing his rhetoric to Obama’s, and retired neurosurgeon Ben Carson mostly stayed away from intraparty conflict.

When CNN moderator Wolf Blitzer tried to get Carson to take a side in the Rubio-Cruz surveillance debate, Carson declined.

“I think you have to ask them about that,” Carson said. “I don’t want to get in between them. Let them fight.”

The “kids’ table” debate earlier in the evening, when four lower-polling candidates clashed, included an extended discussion about strategy fighting the Islamic State.

U.S. Sen. Lindsey Graham, R-S.C., bashed Cruz and Paul in absentia for being “isolationist,” and he maintained his call for 10,000 U.S. ground troops in Iraq and another 10,000 in Syria.

“Some of us have to go,” Graham said. “You’re not going to keep the war from here if some of us don’t go over there.”

He clashed with former Pennsylvania U.S. Sen. Rick Santorum, who said U.S. ground troops should go into Iraq with Arab partners to take ground from the self-proclaimed caliphate. But Santorum did not want to get drawn into the Islamic State’s desired “apocalyptic” battle for Syria.