Hillary Clinton largely looked past her Democratic rivals in Saturday night’s debate, instead repeatedly assailing the Republican field, led by Donald J. Trump. She called Mr. Trump a threat to the nation’s safety, saying he was fast “becoming ISIS’ best recruiter.”

Deflecting persistent attacks from Senator Bernie Sanders of Vermont and former Gov. Martin O’Malley of Maryland over gun control, Wall Street and foreign military entanglements, she accused Mr. Trump of undermining the fight against terrorism.

Mrs. Clinton, the former secretary of state, sought to frame next year’s election as a choice between her cleareyed approach to national security and the recklessness of Republicans who have demonized Muslims since the recent attacks on Paris and San Bernardino, Calif.

“I worry greatly that the rhetoric coming from the Republicans, particularly Donald Trump, is sending a message to Muslims here in the United States, and literally around the world, that there is a clash of civilizations,” she said, “that there is some kind of Western plot or even war against Islam, which then, I believe, fans the flames of radicalization.”