CONCORD, N.H. — U.S. Sen. Jeanne Shaheen opposes deploying American ground troops to the Middle East to fight Islamic State militants but her Republican challenger, Scott Brown, said he remains open to the idea.

A U.S.-led coalition recently began air strikes in Iraq and Syria aimed at destroying the extremist faction that has seized control of a huge chunk of territory stretching from northern Syria to the western outskirts of the Iraqi capital.

Brown said he is not advocating for ground troops but that leaving the option on the table helps “deter bad people from doing bad things.”

“It is naive to announce to our enemies the limits we are imposing on our power,” he told The Associated Press in response to a series of foreign policy questions.

Shaheen, however, said the militants can and should be defeated without sending U.S. ground troops to Syria or Iraq. She has voted to arm and train Syrian rebels, backs the air strikes and has urged the departments of State and the Treasury to crack down on the Islamic State group’s financing to disrupt their terrorist operations.

“My top foreign policy priority is ensuring that the United States and our allies take the fight to (the Islamic State group) wherever they are and give them no safe haven,” she said.

Shaheen, a Democrat and former governor, is running for a second term. Brown is a former U.S. senator who won a special election in 2010 in Massachusetts, lost the seat two years later and moved to New Hampshire late last year.

Brown has been calling Shaheen a naive follower of President Barack Obama on foreign policy and saying she is “confused” about the rising threat of the militant group. Brown said the U.S. has lost its ability to shape events around the world and that his top foreign policy priority would be “restoring American leadership.”

“As a member of the Foreign Relations Committee, Senator Shaheen has not seriously challenged the foreign policy direction of the country but has instead quietly acquiesced to the slow unraveling of American power and influence,” he said.

Brown has criticized Shaheen for missing numerous Senate Foreign Relations Committee hearings, including one about the Islamic State group last year, and says he would secure the border to “keep out the people who would do us harm.”

But The Washington Post reported last week that as a member of the Senate Homeland Security and Governmental Affairs Committee, Brown missed all six hearings on border security that he was eligible to attend.

“Scott Brown’s incredible and outrageous hypocrisy is just the latest example of how his rhetoric is entirely disconnected with reality,” said Shaheen spokesman Harrell Kirstein. “New Hampshire voters can’t trust anything he says.”

The candidates gave similar answers when asked to explain in broader terms what role the U.S. should play in foreign conflicts. Shaheen said America must demonstrate leadership abroad “to promote the peace and stability that help secure America’s interests.”

“We cannot resolve all conflicts everywhere, but when our core interests are at stake we should not shrink from the challenge,” she said.

Brown said the U.S. has a special calling to defend freedom, uphold justice and be a force for good in the world.

“The stronger we are, the safer we are,” he said.