The Baghdad government’s writ does not apply in most of Iraq. The administration’s weak authority has forced the prime minister, Haider al-Abadi, to rely on dozens of Shiite militias to shore up national security. Mr. Abadi has tried to integrate these forces to bring them under his control, but the process has created parallel command structures within the security apparatus.

In practice, the militias answer to a murky network of patronage and loyalties divided among different political parties, religious clerics and external patrons. It’s hard to tell where the militias end and the state begins.

The American experience in Iraq has been plagued by a series of false assumptions, misplaced confidence and poor foresight. In the latest manifestation, since 2014, the White House has wrongly prioritized the narrow, short-term military objective of defeating the Islamic State.

The push to retake Mosul is not simply a case of the Iraqi Army against the Islamic State; instead, an array of armed groups — each driven by its own parochial interests — are set to wage war there. This alone should give American policy makers pause, because of the threat this situation poses to reconstruction and post-conflict stability.

To offset this problem, the United States hopes to broker preliminary agreements between the combatant groups in the Mosul campaign. So far, these efforts have yielded little. For example, there is no consensus on how to determine which civilians joined the Islamic State willingly, which cooperated for protection, or which were not involved at all. There is no protocol on how to prevent acts of retribution between communities, and no guarantee that the militias the United States wants excluded from the campaign would remain on the sidelines.

In the absence of any effective chain of command, it seems unlikely that rules of engagement will be adhered to. With no one to enforce compliance and accountability, parties are more likely to cheat on previous commitments. One of the few beliefs that Iraqis across the sectarian divide share is that the United States will soon disengage completely from their country.

The very diversity of Nineveh’s population makes it more vulnerable than Anbar, which is mainly Sunni Arab, to being carved up along ethnic and religious lines. The only militias’ collective interest — in the defeat of the Islamic State — will end when the province is retaken. For many, fighting the Islamic State is not about saving the nation or the state; it’s an opportunity to reap the political spoils of conquest.