As the United States prepares to withdraw its forces from Iraq by year’s end, a chorus of influential voices is insisting that the beneficiary of such a move is Iran. That is, a beleaguered Shiite theocracy overwhelmed by low-simmering opposition at home and growing isolation abroad is said to emerge as the local hegemon. Such views discount how Iran’s contentious vision for the future of Iraq and its divisive tactics have alienated Iraqis across the sectarian spectrum. Iran may have been able to project its influence in an Iraq beset by civil war, but Tehran increasingly is on the margins as Iraq reconstitutes its national institutions.

To begin with, Iran’s governing template has no constituency among Iraqi Shiites. Iran’s theocratic absolutism was always in contravention of Shiite political traditions, making its export problematic if not impossible. Iraq’s most esteemed and influential cleric, Grand Ayatollah Ali Sistani, stands with mainstream clerics in rejecting the notion that proper Islamic governance mandates direct clerical assumption of power. Even the Shiite parties — the Islamic Supreme Council of Iraq and Dawa (the party of Prime Minister Nouri al-Maliki) — which have long-standing ties to Tehran — appreciate the untenable nature of the Iranian order. Adel Abdul Mahdi, an influential figure within ISCI, has pointedly stressed, “We don’t want either a Shiite government or an Islamic government.” Also hard to fathom is the notion that radical cleric Moqtada al-Sadr can be a reliable agent of Persian predominance, given his brand of Arab nationalism and erratic behavior. In the end, Iraq’s Shiites understand that their country’s divisions require a different governing structure and the assertion of autonomy from the Shiite power next door.

Beyond disagreements about the role of religion in politics, the two nations have conflicting aspirations for the future of Iraq. Iran has long sought to sharpen Iraq’s sectarian cleavages as a means of unifying Shiites behind Iran’s claims and preventing the rise of a cohesive state. Such a weak and divided Iraq would be too preoccupied with internal squabbles to effectively challenge Iran’s regional assertions. The sectarian conflict, however, has largely ceased with the defeat of al-Qaeda and Sunni militias. As Iraq seeks to reconstitute itself as a nation-state, Maliki has come to recognize that Iranian-backed Shiite militias are as great a threat to his authority as they are to his country’s Sunnis. In the summer of 2008, state power asserted itself over sectarian affinities as Maliki pushed forcefully into Basra, defeating militant Shiite forces allied with Iran. Today, it is not just Washington that complains about Iran’s nefarious activities; Iraqis, too, have privately warned Iran about its mischievous conduct.

On the eve of the U.S. withdrawal, it may be difficult to see the extent to which Iran’s policy in Iraq is in shambles. Since the displacement of Saddam Hussein’s regime, Tehran has pursued two contradictory policies. On the one hand, the clerical state seeks cordial relations with the Iraqi government and has provided aid and commerce as a means of solidifying bilateral relations. Yet Iran has also been arming and nurturing Shiite militias that plot against authorities in Baghdad. Such a paradoxical approach seemed sustainable during the civil war, as Iraq’s hard-pressed Shiites looked to Iran for assistance and thus countenanced its interventions in their country. The end of Iraq’s war, however, has left Iran without a coherent policy. Tehran’s inability or unwillingness to resolve the fundamental contradictions in its approach have done much to alienate the Iraqi government and a populace eager to put the burdens of conflict behind it. Whereas Washington was ill-prepared to deal with the start of Iraq’s civil war, Iran seems unable to deal with its aftermath.

Whether the complete withdrawal of U.S. forces from Iraq is wise is an issue worthy of debate. But the imperative at hand is to ensure Iraq’s continued stability and prevent Iranian mischief in light of America’s departure. The key to this lies as much in diplomacy as in military deployments.

Today, the essential estrangement of Iraqi Shiites from the larger Arab world, and the neighboring Sunni regimes’ unease with their empowerment, makes them vulnerable to Iranian machination. A more forceful U.S. diplomacy, pressing allies to integrate Iraq into the Arab state system, would offer Baghdad additional economic partners and regional interlocutors as well as a means of reestablishing itself as a pivotal state of the Arab world. As the Middle East struggles with transitions that often pit identities against interests, Iraq can offer some useful lessons. Indeed, such a development would not only aid Iraq’s rehabilitation and assist the region political evolution but would further isolate Iran in its immediate environment.

The writer is a senior fellow at the Council on Foreign Relations.