With the U.S.-led coalition military campaign against so-called Islamic State militants likely go on for some time, opinion polls show Americans strongly support the air campaign for now.

But a lengthy military effort against IS could test the patience of the U.S. public and that presents President Barack Obama with a major public opinion challenge in the final two years of his presidency.

President Obama is well aware of the need to build and maintain public support for the military campaign against IS and he made note of congressional backing for the effort at the White House in recent days.

“I’ve spoken to leaders in Congress and I’m pleased that there is bipartisan support for the actions that we are taking,” he said. “America is always stronger when we stand united and that unity sends a powerful message to the world that we will do what’s necessary to defend our country.”

President Obama also took his campaign to the United Nations where he made an appeal for international support.

“There can be no reasoning, no negotiation, with this brand of evil,” he said. “The only language understood by killers like this is the language of force. So the United States of America will work with a broad coalition to dismantle this network of death.”

But President Obama’s critics at home say he needs to do more to build public support for the military campaign.

A New York Times editorial said it was time for a “public debate” before the U.S. “enters another costly and potentially lengthy conflict in the Middle East.” The Times said Congress needs to specifically authorize the military action against IS, and it was critical of lawmakers for “shamelessly ducking” a vote on the issue before they left Washington to return home to campaign in advance of the November midterm elections.

Maintaining public support

The president did win congressional support for his plan to arm and train Syrian rebels as part of the military effort against IS shortly before lawmakers left Washington.

Analyst John Fortier of the Bipartisan Policy Center said it will be important for President Obama to maintain both public and congressional support for the mission for the foreseeable future.

“I think the president has to thread the needle,” he said. “Some on the right will say he’s not doing enough, whether it is boots on the ground or just an ineffective plan—that’s the argument. And on the left there will be worry that he is moving back into Iraq.”

Some conservatives are unhappy that President Obama has ruled out the use of ground troops to go after IS.

Republican Congressman Peter King of New York told Fox News Sunday that limiting U.S. involvement to air power might prove to be a mistake.

“I don’t know why the president says up front that we are not going to put boots on the ground,” he said. “Don’t take anything off the table. Never let the enemy know what you are going to do or not going to do.”

Public opinion experts, like Karlyn Bowman with the American Enterprise Institute, say the president faces the challenge of maintaining public support for a dangerous, unpredictable military involvement that could stretch on indefinitely.

“It’s really hard to look into the crystal ball and say how long will support last,” she said. “But certainly if you look at historical public opinion, support will be sustained if the mission is clearly defined and he prosecutes it successfully.”

Recent polls suggest that support for air strikes against IS does not extend to the use of U.S. ground troops and that’s important to keep in mind, said John Mueller, an expert on public opinion and war at Ohio State University.

“Efforts that are pin-prick like and supportive and do not cost American lives might find a certain amount of tolerance, but not anything bigger than that,” he said. “The American public just seems to be overwhelmingly fed up with getting into these foreign wars.”

Support can be fleeting

Recent history shows the public is often initially supportive of U.S. military ventures, but that the support can wane fairly quickly.

Gallup found that more than 80 percent of Americans supported the U.S. invasion of Afghanistan in 2001, while 64 percent supported sending ground forces into Iraq on the eve of the invasion in 2003.

But a recent Associated Press/Gfk poll found that three in four Americans now believe both of those wars will be judged as failures.

With congressional midterm elections in November, President Obama has an important political stake in ensuring the success of the military campaign against ISIL, said Michael Dimock, a public opinion expert with the Pew Research Center.

“His handling of foreign affairs got better ratings than his overall job ratings for almost his entire first term,” he said. “And now in his second term that is inverted. Foreign policy is sort of a drag on his overall standing, not a lift.”

A recent New York Times/CBS News poll found that only 34 percent of Americans approved of his handling of foreign policy issues, the lowest figure yet on that issue. A number of Republican candidates around the country are already weaving a critique of the president’s foreign policy record into their speeches and debates.

Midterm elections are often seen as a referendum on the president, and public perceptions of President Obama come Election Day in November will be shaped in part by the success of the U.S. military campaign against IS over the next several weeks.

The military campaign against IS could also figure in President Obama’s presidential legacy.

He was elected in 2008 promising a new era of engagement with the world that would not be characterized by U.S. military involvement in wars like those in Afghanistan and Iraq. The new president had hoped to refocus on rebuilding the economy on the home front, which was still reeling from a devastating recession.

But now approaching the final two years of his presidency, President Obama is confronted with another military challenge in Iraq and Syria and the success of that mission will likely play a role in how historians eventually view his time in office.

Jim Malone has served as VOA’s National correspondent covering U.S. elections and politics since 1995. Prior to that he was a VOA congressional correspondent and served as VOA’s East Africa Correspondent from 1986 to 1990. Jim began his VOA career with the English to Africa Service in 1983.