US Army soldiers from the 1st Infantry Division watch as Iraqi army soldiers with the 72nd Brigade march at Camp Taji, north of Baghdad, Iraq, Feb. 13. More than 1,400 members of the 72nd Brigade graduated from a six-week training course, assisted by US Soldiers as part of helping combat the Islamic State militant group in Iraq.

The US is now in a war with the Islamic State in Iraq and Syria and is providing arms to Egypt, which is fighting an IS affiliate in the Sinai Peninsula. The Obama administration is also considering what, if anything, it can do about the rise of the group in Libya, where it beheaded 21 Egyptian Christians on videotape this month.

IS continues to grab headlines with the executions of captives and the sexual enslavement of women, and the movement is clearly driven by messianic fervor. The group's successes have inspired small terror attacks in the past year from Sydney to Paris to Ottawa, and their successful social media outreach to wannabe warriors in the West all guarantee more attacks will follow.

That many of their views run counter to both world and Islamic history hardly matters. Arguing this point with them is like arguing that the Bible gets physics and astronomy wrong.

While there's been much debate about whether they are or are not "really" Islamic, that misses the point. All that matters is that they're acting based on what they believe to be immutable truths, not what President Barack Obama or even jihadi clerics have to say about their nature.

Nevertheless, Mr. Obama has leaped into what his administration calls "countering violent extremism" with both feet. He's sponsoring a conference on the topic in Washington this week, with representatives expected from more than 60 countries.

Groups like al Qaeda and ISIL promote a twisted interpretation of religion that is rejected by the overwhelming majority of the world's Muslims. The world must continue to lift up the voices of Muslim clerics and scholars who teach the true peaceful nature of Islam. We can echo the testimonies of former extremists who know how terrorists betray Islam. We can help Muslim entrepreneurs and youths work with the private sector to develop social media tools to counter extremist narratives on the Internet. ...

More broadly, groups like al Qaeda and ISIL exploit the anger that festers when people feel that injustice and corruption leave them with no chance of improving their lives. The world has to offer today's youth something better.

Governments that deny human rights play into the hands of extremists who claim that violence is the only way to achieve change. Efforts to counter violent extremism will only succeed if citizens can address legitimate grievances through the democratic process and express themselves through strong civil societies. Those efforts must be matched by economic, educational and entrepreneurial development so people have hope for a life of dignity.

Obama is right. The majority of the world's Muslims reject IS's brand of Islam, which has an end-times vision of a war to wipe out all who disagree with them and thus usher in the apocalypse. But the notion of a "just say no to jihad" app or something similar ending the appeal of this is far-fetched. Those who are signing on with the group's brand of ultra-violence and radical reinterpretation of Islamic texts and history are seeking to fill a spiritual void in their own lives.

Enough blame to go around

As for democracy and human rights, the US is now backing governments across the Middle East, from Saudi Arabia to Egypt to Iraq, that engage in massive amounts of torture and repression. US support for Iraq's government is indirectly aiding the Shiite militias that work with Baghdad, and there have been persistent and disturbing reports of mass murders by America's current allies in this fight. A jihadi wannabe at his home computer does not have far to look to find evidence of American hypocrisy in this regard.

The popular New York Times columnist Roger Cohen puzzles over what's going on in a piece this week. He writes:

Who or what is to blame? There are two schools. For the first, it is the West that is to blame through its support for Israel (seen as the latest iteration of Western imperialism in the Levant); its wars (Iraq); its brutality, (Guantánamo, Abu Ghraib); its killing of civilians (drones); its oil-driven hypocrisy (a jihadi-funding Saudi ally).

For the second, it is rather the abject failure of the Arab world, its blocked societies where dictators face off against political Islam, its repression, its feeble institutions, its sectarianism precluding the practice of participatory citizenship, its wild conspiracy theories, its inability to provide jobs or hope for its youth, that gives the Islamic State its appeal.

I find the second view more persuasive. The rise of the Islamic State, and Obama’s new war, are a direct result of the failure of the Arab Spring, which had seemed to offer a path out of the deadlocked, jihadi-spawning societies of the Arab world.

In fact neither side of this false binary is correct. Or put another way – it involves all these things and more. In Egypt, a free election followed the downfall of Hosni Mubarak, who was staunchly backed by the US for 30 years. The winners were the Muslim Brotherhood – enemies of the Islamic State but also supporters of implementing a version of Islamic law that is staunchly hostile to liberal democracy. A coup followed, and a military-backed order is now being reconstituted in Egypt, the Arab world's largest country, much on the lines of the Mubarak years, with backing from the US.

In Mr. Cohen's formulation, Arab states need not only democracy, but voters who choose governments that residents of New York or London would find palatable. And while the enormous injustice that exists in many Muslim-majority states fuels support for radical ideas, the radical ideas have a power of their own. At any rate, even if you agree with him, what then is to be done? Remake huge portions of the world, somehow, in our own image. The Bush administration tried that in Iraq, and it has not worked out very well.

Back in the world of the practical, there is fighting to be done. The Islamic State dreams of becoming a potential threat beyond the Middle East and North Africa, and that requires some kind of response. But Wayne White, a career diplomat who held posts across the Middle East and finished his career as the deputy director of the State Department's Middle East and South Asia intelligence Office, is worried about mission creep.

Vulnerability of Marine trainers

In a piece he published over the weekend he's particularly concerned about the 300-plus Marines now stationed at Asad Air Base in Anbar Province, where they're training members of the Iraqi Army's 7th Division. Most of the overwhelmingly Sunni province is out of the central government's control, and last week IS fighters seized the town of Baghdadi, just miles away.

The day after that victory they mounted a failed assault on Asad, which involved a suicide bomber attempting to breach the gates. White worries about what could happen if IS concentrates forces in the area.

Stationing US personnel and assets at al-Asad Airbase in Iraq (mostly surrounded by IS-held territory) was very risky. The shield between 400 American trainers and IS forces is composed of Iraqi police and troops, both with an iffy track record against determined IS assaults. The fall of the nearby town of al-Baghdadi and a direct IS assault on al-Asad late last week were hardly surprising given the isolation of these somewhat weakly held locales.

The Iraqis so far have held al-Asad Airbase, but at great cost against a relatively small IS assault force. In the face of a much larger IS force all bets are off, with the very real possibility of a direct American face-off on the ground with IS. Even now, nearby IS forces could bombard al-Asad with weapons such as heavy mortars....

There is, of course, a solution to the US problem at al-Asad: commit US combat troops to defend the trainers. This, however, would ominously mirror the scenario in which South Vietnamese troops failed to protect US advisors and assets at an airbase and a barracks facility this month 50 years ago, which led to the deployment of the first US combat units to Vietnam on March 8, 1965.

While the risk of a large number of Marines being killed – and perhaps worse, captured and paraded in one of the Islamic State's snuff films – would appear small at the moment, it isn't zero. So it's worth considering what comes next. A full-throated rush to a major war in Iraq again in the aftermath of such an event becomes much more likely. Consider the US reaction to the killing of four American Blackwater security contractors at Fallujah in Anbar in 2004, where some of their bodies were strung up over a bridge.

Formative experience in prison

The US ended up drawn into two major battles in Fallujah against what was then known as Al Qaeda in Iraq (IS is built on the foundations of that earlier jihadi group), inflaming Iraqi opinion against the US occupation. The two assaults on Fallujah cost 122 American lives. Though more than 1,000 Al Qaeda in Iraq members and allies were killed in the fighting, the city was devastated and hundreds of civilians were killed as well. Fallujah remains today a hotbed of jihadi activity, with IS mostly in control of the town. Jihadi survivors of those two engagements are today some of the Islamic State's most battle-tested fighters.

The other prisoners did not take long to warm to him, Abu Ahmed recalled. They had also been terrified of Bucca, but quickly realised that far from their worst fears, the US-run prison provided an extraordinary opportunity. “We could never have all got together like this in Baghdad, or anywhere else,” he told me. “It would have been impossibly dangerous. Here, we were not only safe, but we were only a few hundred metres away from the entire al-Qaida leadership.”

It was at Camp Bucca that Abu Ahmed first met Abu Bakr al-Baghdadi, the emir of Isis who is now frequently described as the world’s most dangerous terrorist leader. From the beginning, Abu Ahmed said, others in the camp seemed to defer to him. “Even then, he was Abu Bakr. But none of us knew he would ever end up as leader.”