Updated

Iraq's embattled prime minister has fought off an attempt to push him out of office, aided by divisions among his opponents and Iranian intervention on his behalf.

Nouri al-Maliki's tactical victory averts a potentially destabilizing contest to replace him, at least for the time being, but perpetuates the sectarian-based deadlock that has paralyzed the country for years.

In the latest setback for those trying to unseat al-Maliki, the country's president said Sunday he would not ratify a petition for a no-confidence vote because it lacked the needed number of signatures.

An Iraqi lawmaker who supports the prime minister says Iran is helping him by trying to buy time. Tehran is pushing for a two-month grace period during which al-Maliki, who has close ties with the Islamic Republic, would ostensibly try to appease coalition partners who accuse him of monopolizing power.

At the root of the standoff is the unresolved power struggle between Iraq's three main groups — the majority Shiites and minority Sunnis and Kurds — following the ouster of Saddam Hussein in the U.S.-led invasion of 2003.

Elections in March 2010 were inconclusive. Al-Maliki was able to form a national unity government but its component parties do not trust and in some cases detest each other.

The continued impasse has raised the possibility of renewed sectarian violence and hampered plans for rebuilding the country ravaged by a decade of fighting.

Six months after the departure of the last U.S. forces, hopes seem to be fading that oil-rich Iraq can quickly transform into a functioning democracy.

"It's a sensitive and tense situation and anything could go wrong," analyst Joost Hiltermann of the International Crisis Group said of the ongoing political crisis.

Al-Maliki, a Shiite, is under fire for breaking promises to share power with his partners in a unity government that includes the Sunni-dominated Iraqiya bloc, Kurdish parties and loyalists of radical Shiite cleric Muqtada al-Sadr.

Sunnis who believe he is targeting their leaders with politically motivated prosecutions and Kurds who think he is hostile to their northern autonomy have their own reason to dislike the prime minister.

Al-Maliki's erstwhile partners have been pushing to unseat him with a no-confidence vote in the 325-member parliament, but appear to be struggling to muster the required 164 votes.

Last week, they said they sent a petition for a no-confidence vote with 176 signatures of lawmakers to President Jalal Talabani — a Kurd with ties to Iran who is apparently reluctant to see al-Maliki replaced. On Sunday, Talabani said the petition only had 160 valid signatures, falling short by four. He said 13 lawmakers told him they were withdrawing or suspending their signatures.

The rebels in al-Maliki's coalition can also force a no-confidence vote without Talabani's help, but it's a longer, more cumbersome process.

After Talabani's ruling, al-Maliki called for more talks to resolve the coalition crisis.

Al-Maliki's main foreign backer, Shiite-ruled Iran, is also trying to keep him in power, according to several Shiite politicians who spoke on condition of anonymity because of the sensitive nature of those efforts. Al-Maliki is a key guarantor of Tehran's influence in Iraq and forged close ties with Iran's leaders during two decades in exile there in the Saddam era.

The push to unseat al-Maliki hinges on al-Sadr, whose loyalists have 40 seats in parliament. The mercurial young cleric has a long history of conflict with al-Maliki, but is also particularly vulnerable to Iranian pressure.

Sadr bolted the Shiite political camp several weeks ago to side with Iraqiya and the Kurds. Shortly after that, he was summoned to Tehran, where he was asked to give al-Maliki two more months to work out his coalition problems, according to Shiite lawmaker Humam al-Hamoudi, an al-Maliki supporter.

To add to the pressure, al-Sadr's Iranian-based spiritual leader issued a religious edict that would rule out having al-Sadr side with Sunnis and Kurds.

Al-Sadr's response to the pressure remains unclear.

Al-Hamoudi said he expects al-Sadr will eventually return to the Shiite fold, for fear of losing support among his constituents.

Before departing for Tehran, al-Sadr tried to unify the ranks, asking senior members of his movement and the Mahdi Army militia to sign a loyalty oath to him with a fingerprint dipped in blood, said a senior militia commander, Abu Ali Rubai.

Meanwhile, the push against al-Maliki is likely to continue.

The coalition rebels said in a statement they would "continue to mobilize lawmakers," while al-Hamoudi suggested that a lack of trust will make it hard to solve the coalition's problems.

"The problem is that al-Maliki has signed so many signatures before, but the level of commitment will only be seen in the future," al-Hamoudi said, hinting at broken pledges of the past.

In the original coalition deal, reached after nine months of political wrangling following the 2010 election, al-Maliki made sweeping concessions in a bid to form a government. "What he signed up to was very theoretical and not achievable," said Reidar Visser, a Norway-based analyst who writes for the blog historiae.org.

Among other things, al-Maliki promised to set up a body that would have final say on legislation and be headed by the leader of Iraqiya, but later reneged. Al-Maliki also failed to appoint defense and interior ministers, jobs he kept for himself as he tightened control over the security forces.

The deadlock has meant parliament is not passing important bills — key among them those that regulate oil revenue-sharing.

The uncertainty has fed a number of Iraq's ongoing crises, such as the conflict between the autonomous Kurdistan region in the north and the central government in Baghdad over the oil rights.

Hiltermann said Iraq's lack of effective government has been cushioned by its oil riches — an income tens of billions of dollars a year.

He said he expects Iraq to muddle through as long as oil keeps flowing. "It's not a good situation for Iraq," he said. "Just more of the same."