Photograph by Sebastian Meyer/Corbis.

To the defense of Erbil: this was the main cause that drew President Obama back to combat in Iraq last week, two and a half years after he fulfilled a campaign pledge and pulled the last troops out.

After Mazar-i-Sharif, Nasiriyah, Kandahar, Mosul, Benghazi, and a score of other sites of American military intervention—cities whose names would have stumped most American "Jeopardy!" contestants before 2001—we come now to Erbil. One can forgive the isolationist: Where?

Erbil has an ancient history, but, in political-economic terms, the city is best understood these days as a Kurdish sort of Deadwood, as depicted in David Milch’s HBO series about a gold-rush town whose antihero, Al Swearengen, conjures up a local government to create a veneer of legitimacy for statehood, all to advance his rackets. Erbil is an oil-rush town where the local powers that be similarly manipulate their ambiguous sovereignty for financial gain—their own, and that of any pioneer wild and wily enough to invest money without having it stolen.

Erbil is the capital of the oil-endowed Kurdish Regional Government, in northern Iraq. There the United States built political alliances and equipped Kurdish peshmerga militias long before the Bush Administration’s invasion of Iraq, in 2003. Since 2003, it has been the most stable place in an unstable country. But last week, well-armed guerrillas loyal to the Islamic State in Iraq and al-Sham, or ISIS, threatened Erbil’s outskirts, forcing Obama’s momentous choice. (The President also ordered air operations to deliver humanitarian aid to tens of thousands of Yazidis and other non-Muslim minorities stranded on remote Mount Sinjar. A secure Kurdistan could provide sanctuary for those survivors.)

“The Kurdish region is functional in the way we would like to see,” Obama explained during a fascinating interview with Thomas Friedman published on Friday. “It is tolerant of other sects and other religions in a way that we would like to see elsewhere. So we do think it is important to make sure that that space is protected.”

All true and convincing, as far as it goes. Kurdistan is indeed one of a handful of reliable allies of the United States in the Middle East these days. Its economy has boomed in recent years, attracting investors from all over and yielding a shiny new international airport and other glistening facilities. Of course, in comparison to, say, Jordan or the United Arab Emirates, Kurdistan has one notable deficit as a staunch American ally: it is not a state. Nor is it a contented partner in the construction of Iraqi national unity, which remains the principal project of the Obama Administration in Iraq. In that light, Obama’s explanation of his casus belli seemed a little incomplete.

Obama’s advisers explained to reporters that Erbil holds an American consulate, and that “thousands” of Americans live there. The city has to be defended, they continued, lest ISIS overrun it and threaten American lives. Fair enough, but why are thousands of Americans in Erbil these days? It is not to take in clean mountain air.

ExxonMobil and Chevron are among the many oil and gas firms large and small drilling in Kurdistan under contracts that compensate the companies for their political risk-taking with unusually favorable terms. (Chevron said last week that it is pulling some expatriates out of Kurdistan; ExxonMobil declined to comment.) With those oil giants have come the usual contractors, the oilfield service companies, the accountants, the construction firms, the trucking firms, and, at the bottom of the economic chain, diverse entrepreneurs digging for a score.

Scroll the online roster of Erbil’s Chamber of Commerce for the askew poetry of a boom town’s small businesses: Dream Kitchen, Live Dream, Pure Gold, Events Gala, Emotion, and where I, personally, might consider a last meal if trapped in an ISIS onslaught, "Famous Cheeses Teak."

It’s not about oil. After you’ve written that on the blackboard five hundred times, watch Rachel Maddow’s documentary “Why We Did It” for a highly sophisticated yet pointed journalistic take on how the world oil economy has figured from the start as a silent partner in the Iraq fiasco.

Of course, it is President Obama’s duty to defend American lives and interests, in Erbil and elsewhere, oil or no. Rather than an evacuation of citizens, however, he has ordered a months-long aerial campaign to defend Kurdistan’s status quo, on the grounds, presumably, that it is essential to a unified Iraq capable of isolating ISIS. Yet the status quo in Kurdistan also includes oil production by international firms, as it might be candid to mention. In any event, the defense of Kurdistan that Obama has ordered should work, if the Kurdish peshmerga can be rallied and strengthened on the ground after an alarming retreat last week.

Yet there is a fault line in Obama’s logic about Erbil. The President made clear last week that he still believes that a durable government of national unity—comprising responsible leaders of Iraq’s Shiite majority, Kurds, and Sunnis who are opposed to ISIS—can be formed in Baghdad, even if it takes many more weeks beyond the three months of squabbling that have already passed since the country’s most recent parliamentary vote.

The project of a unified Baghdad government strong enough to defeat ISIS with a nationalist Army and then peel off Sunni loyalists looks increasingly like a pipe dream; it was hard to tell from the Friedman interview what odds Obama truly gives the undertaking.

Why has political unity in Baghdad proven so elusive for so long? There are many important reasons—the disastrous American decision to disband the Iraqi Army, in 2003, and to endorse harsh de-Baathification, which created alienation among Sunnis that has never been rectified; growing sectarian hatred between Shiites and Sunnis; the infection of disaffected Sunnis with Al Qaeda’s philosophy and with cash and soft power from the Persian Gulf; interference by Iran; the awkwardness of Iraq’s post-colonial borders, and poor leadership in Baghdad, particularly under Prime Minister Nuri al-Maliki. But another reason of the first rank is Kurdish oil greed.

During the Bush Administration, adventurers like Dallas-headquartered Hunt Oil paved the way for ExxonMobil, which cut a deal in Erbil in 2011. Bush and his advisers could not bring themselves to force American oil companies such as Hunt to divest from Kurdistan or to sanction non-American investors. They allowed the wildcatters to do as they pleased while insisting that Erbil’s politicians negotiate oil-revenue sharing and political unity with Baghdad. Erbil’s rulers never quite saw the point of a final compromise with Baghdad’s Shiite politicians—as each year passed, the Kurds got richer on their own terms, they attracted more credible and deep-pocketed oil companies as partners, and they looked more and more like they led a de-facto state. The Obama Administration has done nothing to reverse that trend.

And so, in Erbil, in the weeks to come, American pilots will defend from the air a capital whose growing independence and wealth has loosened Iraq’s seams, even while, in Baghdad, American diplomats will persist quixotically in an effort to stitch that same country together to confront ISIS.

Obama’s defense of Erbil is effectively the defense of an undeclared Kurdish oil state whose sources of geopolitical appeal—as a long-term, non-Russian supplier of oil and gas to Europe, for example—are best not spoken of in polite or naïve company, as Al Swearengen would well understand. Life, Swearengen once pointed out, is often made up of “one vile task after another.” So is American policy in Iraq.