DERRY, N.H. — Presidential hopeful Bernie Sanders voiced concerns Friday about President Obama’s decision to dispatch a small number of Special Operations troops to northern Syria, saying through a spokesman that he fears the United States could be drawn into "the quagmire of the Syrian civil war.”

The independent senator from Vermont “believes that the crisis in Syria will be solved diplomatically, not militarily,” Sanders spokesman Michael Briggs said in a statement.

Sanders, who is seeking the Democratic nomination for the White House, was asked about the issue later Friday by an audience member at a town hall in Derry. He said that he agrees with Obama’s overall objective to provide support to groups and countries battling the Islamic State in the region.

But Sanders added: “You have a quagmire in a quagmire. . . . My nightmare is that we get sucked into a never-ending war in that part of the world.”

The decision marks a major shift for Obama, whose determination to defeat the Islamic State in Iraq and Syria has been balanced by an abiding desire that U.S. troops not be pulled too deeply into the Syrian conflict.

The deployment will involve fewer than 50 Special Operations advisers who will work with resistance forces battling the Islamic State in northern Syria but will not engage in direct combat, Obama administration officials said.

Sanders supports efforts by Secretary of State John F. Kerry to bring Iran, Saudi Arabia, Russia and other nations into discussions on how to end the the civil war, Briggs added.

Sanders has said that he is not categorically opposed to the use of military force but strongly believes that war should be the last resort in addressing international conflicts.

He is in the midst of a two-day campaign swing through New Hampshire, the first presidential primary state. 

The White House said President Obama plans to deploy a small number of special operations forces to Syria to advise rebels Washington deems moderate. (Reuters)

Greg Jaffe contributed to this report.