See more of the story

In May, I visited Vietnam and met with university students. After a week of being love-bombed by Vietnamese, who told me how much they admire America, want to work or study there, and have friends and family there, I couldn't help but ask myself: "How did we get this country so wrong? How did we end up in a war with Vietnam that cost so many lives and drove them into the arms of their most hated enemy, China?"

It's a long, complicated story, I know, but a big part of it was failing to understand that the core political drama of Vietnam was an indigenous nationalist struggle against colonial rule — not the embrace of global communism, the interpretation we imposed on it.

The North Vietnamese were both communists and nationalists — and still are. But the key reason we failed in Vietnam was that the communists managed to harness the Vietnamese nationalist narrative much more effectively than our South Vietnamese allies, who were too often seen as corrupt or illegitimate. The North Vietnamese managed to win (with brutal coercion) more Vietnamese support not because most Vietnamese bought into Marx and Lenin but because Ho Chi Minh and his comrades were perceived to be the more authentic nationalists.

I believe something loosely akin to this is afoot in Iraq. The Islamic State, with its small core of jihadis, was able to seize so much non-jihadi Sunni territory in Syria and Iraq almost overnight not because most Iraqi and Syrian Sunnis suddenly bought into the Islamist narrative of the Islamic State's self-appointed caliph. Most Iraqi and Syrian Sunnis don't want to marry off their daughters to a bearded Chechen fanatic.

They have embraced or resigned themselves to the Islamic State because they were systematically abused by the pro-Shiite, pro-Iranian governments of Bashar Assad in Syria and Prime Minister Nouri al-Maliki in Iraq — and because they see ISIL as a vehicle to revive Sunni nationalism and end Shiite oppression.

The challenge the United States faces in Iraq is trying to defeat the Islamic State in tacit alliance with Syria and Iran, whose local Shiite allies are doing a lot of the fighting in Iraq and Syria. Iran is seen by many Syrian and Iraqi Sunnis as the "colonial power" dominating Iraq to keep it weak.

Obsessed with communism, America intervened in Vietnam's civil war and took the place of the French colonialists. Obsessed with jihadists and 9/11, are we now doing the bidding of Iran and Syria in Iraq? Is jihadist to Sunni nationalism what communism was to Vietnamese nationalism: a fearsome ideological movement that triggers emotional reactions in the West — reinforced with videotaped beheadings — but that masks a deeper underlying nationalist movement that is to some degree legitimate and popular in its context?

I wonder what would have happened had the Islamic State not engaged in barbarism and declared: "We represent the interests of Syrian and Iraqi Sunnis who have been brutalized by Persian-directed regimes of Damascus and Baghdad. If you think we're murderous, then just Google 'Bashar Assad and barrel bombs' or 'Iraqi Shiite militias and the use of power drills to kill Sunnis.' You'll see what we faced after you Americans left. Our goal is to secure the interests of Sunnis in Iraq and Syria. We want an autonomous 'Sunnistan' in Iraq just like the Kurds have a Kurdistan — with our own cut of Iraq's oil wealth." That probably would have garnered huge support from Sunnis everywhere.

The Islamic State's magazine, Dabiq, recently published an article, "Reflections on the Final Crusade," (transcribed by the Middle East Media Research Institute), which argued that America's war on the Islamic State only serves the interests of America's enemies: Iran and Russia. It quotes U.S. strategists as warning that Iran has created a "Shia-belt from Tehran through Baghdad to Beirut," a threat much greater than the Islamic State.

Then why did the Islamic State behead two U.S. journalists? Because it is a coalition of foreign jihadis, local Sunni tribes and former Iraqi Baath Party military officers. I suspect the jihadis in charge want to draw the U.S. into another "crusade" against Muslims — just like Osama bin Laden — to energize and attract Muslims from across the world and to overcome their main weakness, namely that most Iraqi and Syrian Sunnis are attracted to the Islamic State simply as a vehicle of their sectarian resurgence, not because they want puritanical/jihadist Islam. There is no better way to get secular Iraqi and Syrian Sunnis to fuse with the Islamic State than have America bomb them all.

Thomas Friedman's column is distributed by the New York Times News Service.