Mark Ilaria is a reluctant war booster.

All summer, the 57-year-old ­industrial-water-treatment salesman watched from his home in this leafy pocket of New England as Islamic State terrorists became more barbaric. After they persecuted Christians in Iraq, Ilaria, a Catholic, changed his Facebook profile picture to an Arabic Nazarene symbol in solidarity with the victims. And when he saw that they had beheaded two American journalists in Syria, he decided something had to be done.

“As much as the pope says to pray, praying isn’t enough,” Ilaria said Tuesday. “Just hit them with a drone and leave? That doesn’t work either. I wish it did. But this is not a video game.”

Ilaria, a self-described political moderate who leans Republican, said he doesn’t have the stomach for another decade-long entanglement in another faraway country. Yet he has concluded that the Islamic State group is such a serious a threat to U.S. interests that sustained airstrikes in Iraq and Syria are required.

“They’re actually crucifying people,” Ilaria said. “How do you negotiate with these idiots? You’ve got to do something. . . . Obama does understand this. I really think he does.”

As President Obama prepares to address the nation Wednesday night on how the United States should confront the turmoil in Iraq and Syria, Americans long weary of war have quickly shifted in favor of decisive military action. A Washington Post-ABC News poll this week found that 71 percent of Americans support airstrikes in Iraq, while 65 percent back airstrikes in Syria.

The sharp move in public opinion was apparent in interviews conducted in three parts of the state with Ilaria and about two dozen other New Hampshire voters, of all stripes, who cast ballots in Tuesday’s primary elections.

Most voters interviewed here said the United States should begin airstrikes in Syria and continue them in Iraq, where Obama has authorized limited action over the past month. Many voters sharply criticized Obama’s leadership because they believe he has not been decisive enough in setting the military’s course.

“I don’t think he’s showing any leadership,” said Scott LaClair, 44, a Republican and flight attendant from Nashua. “The United States looks as weak as it’s ever been in history.”

But voters also voiced deep uneasiness with military action, even as they said they had concluded that it is necessary.

“It’s such a repugnant ideology, an evil ideology,” said Jerry Han­aver, 65, a Democrat and retired federal housing worker in Bedford, referring to the Islamic State’s doctrine. “If war is truly needed and warranted, then being weary of it is not a reason not to go into it.”

A few people interviewed here said they also support sending troops on the ground in both countries.

Of those interviewed, only one — Francine Davis of Nashua — said the United States should refrain from any military response. “Let the countries around there deal with it,” the 73-year-old retiree said.

Davis, a registered independent who said she voted for Obama in 2012, said she fears possible repercussions from any U.S.-led military action. “I don’t want the United States to be bombed by these crazy people,” she said. “That’s a monster over there.”

These New Hampshire residents, like many other Americans, said they are tired of war after more than a decade of conflict in Iraq and Afghanistan has extracted so much blood and treasure. Many also fear that Obama is leading the country into yet another long war, but they don’t see a simple alternative.

“Those beheadings — it’s almost like they’re daring us to act,” said Christine Hall, 50, a construction engineer in Bedford. “I think we should go in quickly and swiftly and get out of there. . . . It’s tough. Part of me thinks we shouldn’t be the world’s police. But if we aren’t, who will be?”

Alfred Sanel, 76, a Republican and a retired Bedford businessman, said Americans “can’t talk our way through this. These people are animals, and the only way to deal with animals is to send in more rabid animals. The only solution I know is to send troops on the ground.”

Sanel’s wife, Barbara, 60, disagreed. “We’re fighting an enemy that is not bound by the rules of war,” she said, while agreeing that “we have to do something.”

In New Hampshire especially, the rising violence of the Islamic State is on the forefront of people’s minds. Both of the slain journalists have roots in this small state: James Foley grew up in tranquil Rochester, where his family still lives and where neighbors had been praying for his safe return for nearly two years. The other journalist, Steven Sotloff, graduated from prep school in Meriden, although he spent most of his childhood in Florida.

Jennifer Blackwood, 40, a stay-at-home mom in Bedford, said the beheading videos “just make it so real. I have a 6-year-old, and he says: ‘What’s happening? What are they doing? Are those bad men?’ ”

Barbara Deshaies, 68, a housecleaner in Bedford, said: “When they beheaded the first guy, I was dumbfounded. I thought, ‘Oh, my God, what’s next?’ Then, two weeks later, another one. Now, anytime I go to a big event — like when I go to NASCAR — I wonder, ‘Are they going to bomb us today?’ ”

The threat has emerged as a major issue in the hard-fought Senate race between Democratic incumbent Jeanne Shaheen and challenger Scott Brown, the winner of Tuesday’s Republican primary. Over the weekend, Brown released a harrowing campaign video, “Reestablish America,” in which the candidate says the Islamic State “makes al-Qaeda look like Boy Scouts. . . .We’re in trouble.” On Monday, Shaheen said in a Senate floor speech that “we must vigorously pursue those responsible and bring them to justice.”

New Hampshire’s other senator, Kelly Ayotte, is one of the Republican Party’s loudest voices in favor of using military force against the Islamic State and other threats.

Historically, New Hampshirites have been relatively hawkish, though not belligerently so. There is a big military presence here, including the Portsmouth Naval Shipyard and a sizable veteran population. The state’s geographic position on the Atlantic Coast has made it vulnerable to foreign attacks over the generations. During World War II, underwater nets were erected to protect Portsmouth’s harbor from German U-boats.

But New Hampshire also is a state that soured on war during George W. Bush’s second term. In 2006, Democratic candidates rode an antiwar wave to unseat incumbent Republican congressmen in both of the state’s congressional districts.

One of those Democrats, Paul Hodes, is now out of office, having given up his seat in 2010 to run unsuccessfully against Ayotte. Stopping to chat outside his voting place in downtown Concord on Tuesday, Hodes said he feels the country is ready for “a strong military response” to the Islamic State terrorists.

“There is both reluctance and resolve that are at play here,” Hodes said. “There is reluctance about adventurism, but deep resolve and a sad realization that we are in a long-term battle against a radicalized element.”

Thomas Adams, 72, spent much of Tuesday morning holding signs for Democratic candidates outside the Concord voting location, two blocks from the gold-domed State House. Adams — an independent who said he voted for Obama — expressed support for airstrikes in Syria, but he questioned whether they could extinguish the threat.

“I’m not opposed to using weapons to defang that organization,” he said, “but that only removes the fangs.”