DES MOINES – For Bernie Sanders, it was a missed opportunity.

The second Democratic debate was a high-stakes chance for him to blunt Hillary Rodham Clinton's resurgence at one of the more critical times in the Democratic contest for president.

But while Clinton was on the defensive over foreign policy and terrorism, the challenges came largely from the moderators. Sanders failed to deliver in small and large ways at the Democratic presidential debate Saturday that would have either cast positive attention on him or negative attention on her.

It's a dynamic that explains why she's pulling comfortably ahead of him in the Democratic race and is likely to remain there in the weeks to come.

After the terrorist attacks in Paris on Friday, Americans expected to hear about foreign policy and, more specifically, how the candidates planned to fight the Islamic State in Iraq and the Levant, which took responsibility for killing 129 people.

But when Sanders in his opening statement was asked to talk about the attacks, he uttered a mere two sentences on terrorism — totaling about 20 seconds — before quickly switching back to his standard stump speech.

"I'm running for president because as I go around this nation I talk to a lot of people," he said. "And what I hear is people concerned that the economy we have is a rigged economy."

The abrupt switch from terrorism, and his claim that climate change is the biggest threat to national security, seemed out of place as the Paris attacks dominated the world's attention.

Sanders' problems with the debate began even before the candidates walked on stage. His campaign spent hours disputing published reports that aides were angry about changes in the format to reflect the Paris attacks. Clinton supporters flooded social media saying anyone who couldn't change topics based on world events couldn't handle being president.

The independent senator from Vermont has surprised political observers, even himself, with his popularity in the contest that has translated to large crowds and millions of dollars in contributions. But he needs to do something more if he expects to compete with Clinton for the nomination.

With the candidates not debating again for five more weeks, the debate was perhaps his best hope to blunt her rise in the polls. He did provide several strong answers, particularly on reining in Wall Street and ridding politics of unaccountable money. But to get ahead he needed to criticize her, something he and his aides repeatedly say he's not comfortable with.

Instead, Sanders agreed with her more than once.

"I agree with much of what the secretary said," he said about terrorism.

"The secretary's obviously right," he said on her assessment of the Middle East.