Middle East analysts across a broad spectrum — whether they call for more, fewer or different military interventions in the region — say that when it comes to the Islamic State, the West is acting as if it has failed to learn the lessons of the past.

Mr. Bacevich says “the lessons of these failures” are too rapidly forgotten as many Americans succumb to what he calls a form of militarism, “clinging to the illusion that because we have a splendid military, putting it to work will make things come out all right in the end.”

Unfortunately, he says, “little evidence exists to support any such expectation.”

Just as after 9/11, the temptation has again been to strike back hard — a course President Obama has resisted — often reinforcing the narratives of oppression that opponents thrive on, the analysts said.

Then there are the political responses of fear and reaction, as in France, which gave the far-right National Front party its biggest regional wins over the weekend, and in the United States, where Donald J. Trump, who is running for president, promised on Monday to bar all Muslims from entering the United States.

The Islamic State thrives on a claim to be standing up to the entire world — especially Christians and Shiites, whom it considers infidels and apostates — to defend a pure Islam, and its enemies, analysts say, seem determined to oblige.

With the group claiming to defend Sunnis, even though they make up the majority of its victims, the campaigns by predominantly Christian and Shiite powers “may strengthen ISIS rather than the contrary,” said Imad Salamey, an associate professor of political science at the Lebanese American University in Beirut.