The fight against global terrorism took center stage Saturday night when Democrats gathered in Iowa to debate after the gruesome attacks in Paris that laid bare the kinds of threats the next American president will face.
Senator Bernie Sanders of Vermont, after a month in which he has lost some ground in the polls, quickly went on offense, criticizing Hillary Rodham Clinton’s 2002 vote to authorize the invasion of Iraq, which he blamed for the rise of Al Qaeda and the Islamic State.
“I would argue that the disastrous invasion of Iraq, something that I strongly opposed, has unraveled the region completely,” Mr. Sanders said, suggesting that the war had led to the rise of the Islamic State and that Mrs. Clinton’s vote discredited her foreign policy expertise.
A month after the Democratic presidential candidates clashed on gun control and financial regulations in their first debate, which focused largely on domestic and economic issues, they faced a heavy dose of questions on foreign policy and national security from the outset.
Hours after the deadly attacks, CBS News, a co-host of the event, moved to refocus the debate to give candidates an opportunity to discuss how they would respond to such an international crisis.
The candidates all offered opening statements addressing the Paris attacks and outlining their approaches to combating global terrorism and defeating the Islamic State, also known as ISIS or ISIL. Mrs. Clinton said that the United States must summon all of its resources to blunt the group’s rise.
“It cannot be contained,” she said. “It must be defeated.”
Despite the tragic nature of the events, the new backdrop provided Mrs. Clinton, the former secretary of state, with an opportunity to shine as her two remaining rivals, Mr. Sanders and former Gov. Martin O’Malley of Maryland, neither of whom has much foreign policy experience, are under pressure to blunt her momentum.
The moderator pressed Mr. O’Malley and Mr. Sanders on their knowledge of international affairs, asked all three candidates about the level and allocation of military spending, and pressed them to address the contentious issue of the United States’ taking in Syrian refugees.
Mr. Sanders and Mr. O’Malley both expressed a desire to streamline the military and accept refugees, with higher levels of screening. Mrs. Clinton offered a more moderate stance, warning that a robust military was needed to face challenges posed by more traditional rivals such as Russia and China.
Since Mrs. Clinton’s crisp debate performance in October, her poll numbers have surged. She weathered hours of congressional questioning about her handling of the Benghazi attacks, and three of her rivals for the nomination have dropped out.
A New York Times/CBS News survey released this week showed Mrs. Clinton continuing to dominate the race, with more than half of Democratic primary voters backing her and 62 percent thinking she is the candidate who can bring about change in Washington. The shift in the debate’s emphasis to foreign affairs should allow Mrs. Clinton to highlight her deep experience on the international stage, providing an opportunity to extend her advantage.
A half hour into the debate, the discussion turned back to immigration, health care and the minimum wage, and the candidates, who are largely aligned on domestic policy, sparred over some of the details.
Mr. Sanders argued that after years of bailouts, it was time for bankers to start helping the middle class by contributing to the cost of free college tuition. And he lamented that nurses and truck drivers paid higher tax rates, in some cases, than billionaires.
Mr. O’Malley, whose poll numbers have lagged in the low single digits, struck a more combative tone during the debate. He lashed out at Donald J. Trump, the Republican presidential candidate, calling him an “immigrant-bashing carnival barker,” and he argued that Mrs. Clinton was not being generous in her desire to raise the minimum wage.
“I think we should stop taking advice from economists on Wall Street,” Mr. O’Malley told Mrs. Clinton, who has called for a lower minimum wage than he proposes.
“He’s not on Wall Street,” Mrs. Clinton shot back, referring to Alan B. Krueger, the Princeton University economist who has researched the effects of increasing the minimum wage.
Democratic strategists said the debate was a significant moment for Mr. O’Malley. Facing Mrs. Clinton’s star power and the grass-roots support behind Mr. Sanders, he needs to find a way to capture some of the spotlight.
“It’s the play that he has left in his playbook right now, to come out swinging and let people know he’s not just this nice guy and that he can be tough,” said Kevin Geiken, a Democratic political consultant for Bluprint Strategies.
But despite the candidates’ differences, the event did not resemble the free-for-all atmosphere that has characterized Republican debates, which have featured sharp exchanges and personal attacks. While the Republican primary contest is a crowded affair, the Democrats had considerably more time to make their cases and delve into more detailed policy arguments on Saturday with just three candidates on the stage.
Since the last debate, Lincoln Chafee, the former governor of Rhode Island, and former Senator Jim Webb of Virginia have dropped out of the race. Lawrence Lessig, a Harvard professor who was running as a Democrat but was not included in the last debate, also stopped his campaign.
Mr. Sanders, who was criticized for going easy on Mrs. Clinton in the last debate, has been preparing sharper lines to use against her on issues like trade, gun control and her emails, and his advisers say he has been studying her record more closely since their October meeting.
One area on the domestic front that is likely to come up is the issue of criminal justice reform, which the three candidates have been struggling to address after continuing tension between the police and African-Americans.
DeRay McKesson, a leader of the Black Lives Matter movement, said he had a good sense of the plans from Mr. Sanders and Mr. O’Malley, but had not heard a comprehensive proposal on the issue of criminal justice from Mrs. Clinton, despite her meetings with the group.
“She’s been eking it out literally one speech at a time,” Mr. McKesson said. “With Hillary, I only have a surface-level understanding. The debate is a chance to learn what she really thinks about the core issues.”
Some political enthusiasts have complained that because of its Saturday night time slot, the two-hour debate, which is being hosted by CBS News and The Des Moines Register and began at 9 p.m. Eastern time, may not have the audience of previous events that have drawn millions of viewers.
Brad Anderson, who was President Obama’s state director in Iowa in 2012, noted that the candidates were convening at the same time that the undefeated Iowa Hawkeyes took on the Minnesota Golden Gophers in college football.
“The majority of Iowans will be planning their day around that football game,” he said.