BAGHDAD — At the very moment American troops are pulling out of Iraq, the revolt in neighboring Syria is threatening to disrupt the fragile political consensus that U.S. forces spent most of the past few years striving to uphold.

As the Syrian conflict takes on increasingly sectarian dimensions, the crisscrossing rivalries that had been held somewhat in check in recent years among Iraq’s Shiite majority and its Kurdish and Sunni minorities also risk being inflamed. Syria’s sectarian makeup is almost a reverse image of Iraq’s, with a minority, Shiite-affiliated Alawite regime confronting a protest movement drawn largely from the country’s Sunni majority.

Iraq’s Sunnis have accused Shiites of dispatching militiamen to help Syrian President Bashar al-Assad, and Shiites here allege that Sunnis are volunteering to fight with the fledgling rebel Free Syrian Army. And both sides fear the consequences for Iraq of the region’s rapidly shifting balance of power.

“Syria plays into a lot of the unresolved issues in Iraq,” said Toby Dodge, an international relations analyst at the London School of Economics. “It’s a destabilizing factor, and especially as we go into the post-withdrawal dynamic.”

It is in the context of this complexity that Iraqi Foreign Minister Hoshyar Zebari pleads for understanding of Iraq’s much-criticized stance toward Syria. Iraq’s abstention from an Arab League resolution suspending Syria’s membership and imposing sanctions should not be interpreted as implicit support for Assad’s regime but rather as a necessity born of Iraq’s own political fragility, he said.

“My job is to find the mainstream view of all, in order not to allow the political situation to flare,” he said. “The conflict one way or another in Syria is taking on a sectarian dimension. [Iraq’s] Shiites would react one way, the Sunni would react another way, and the Kurds would react in another way.”

That Syria would erupt in revolt on the eve of the American departure could not have been anticipated in 2008 when President George W. Bush and Iraqi Prime Minister Nouri al-Maliki signed the security agreement spelling out that U.S. troops must leave by the end of December 2011.

And Syria is not the only potential source of friction that risks unsettling Iraq once the Americans have gone. Though sectarian violence has abated and Iraq has a coalition government in which the main Shiite, Sunni and Kurdish factions share power, many issues that the United States had assumed would be resolved remain unaddressed. They, too, are resurfacing as the last few thousand U.S. troops prepare to leave.

A bold, and some would say reckless, deal signed by the oil giant Exxon with the regional government in northern Kurdistan has aggravated tensions between the semiautonomous region and the central government over control of the country’s oil wealth.

The recent detentions of hundreds of suspected sympathizers of the outlawed Baath Party, many of them Sunnis, have fueled a push by three mostly Sunni provinces bordering Syria to form their own autonomous regions. It is, they say, a way to counter the growing influence of the Shiite-dominated government in Baghdad.

These centrifugal forces are exacerbating long-standing Iraqi fears that neighboring countries will exploit the departure of the Americans to advance their own interests. Turkey, Saudi Arabia and Iran all are vying for influence in Iraq, as well as in Syria, and they have lined up behind the competing factions in both countries.

“That is our main challenge beyond 2011, to keep the political consensus here in Iraq and not to allow any other power to fill the vacuum left by the Americans,” Zebari said.

But the threat to Syria’s 48-year-old Baathist regime only raises the stakes for regional powers in Iraq and especially for Iran, which already exerts considerable influence in Baghdad but is even more closely allied to Assad’s regime.

That Iran’s chief Arab ally is under threat increases the likelihood that Tehran will further seek to expand its influence in Iraq once the Americans have gone, said Mahmoud Othman, a Kurdish legislator. That will put it in confrontation with the expanding influence of Turkey, which has thrown its support behind the Syrian protest movement and also has close ties with several leading Iraqi Sunni politicians.

“A big part of that conflict will be on Iraqi soil, and we will suffer,” he said.

For Iraq’s Shiites, the bigger fear is that an Islamist Sunni government will seize power in Damascus and strike alliances with Iraq’s disgruntled Sunnis, who are still smarting from their loss of power after the fall of Saddam Hussein.

Suspicions that Syria’s long-banned Muslim Brotherhood is emerging at the forefront of the protest movement have tempered sympathies for Syrians seeking to overthrow their government, said Neama Al-Ebadi, director of the Iraq Center for Research and Studies in the Shiite city of Najaf.

“If Syria becomes a democratic, liberal country, it will be fine,” he said. “But if the Muslim Brotherhood comes to power, this whole Sunni-Shiite story will start again in Iraq.”