Baghdad: When an Iraqi court sentenced a prominent Sunni politician to death recently, it seemed like an unmitigated disaster for the country’s new prime minister, Haider Al Abadi.

Al Abadi, after all, had taken office with an international mandate to create a more inclusive government, and win the trust of Iraq’s disaffected Sunnis so they would fight Daesh militants rather than support them. But the verdict, on capital murder charges brought by the previous government against the politician, Ahmad Al Alwani, prompted the defendant’s Al Alwani tribe to threaten that it would stop battling Daesh.

Al Abadi swung into action. He immediately contacted Sunni officials and Al Alwani tribe members, assuring them that there would be no execution. And he urged them to solve the matter by the tribal tradition of paying “blood money” to the families of the victims, two soldiers who were killed in a gun battle when commandos came to arrest Al Alwani last year.

His handling of the crisis in November was the most tangible sign yet that Al Abadi was successfully shifting the tone of politics here, and that courting Sunnis could help the government battle Daesh more effectively. Reassured by Al Abadi’s outreach, the Al Alwani tribe stayed in the fight on the government’s side.

In nearly every way, Al Abadi has so far been a different leader than his predecessor, Nouri Al Maliki, despite their common Shiite political bloc. And although the obstacles facing his government are vast, and he faces political challenges within his own party, his early performance has encouraged a wide array of Iraqi and Western officials.

In his first months in office, Al Abadi has already appeared three times before Parliament, something Al Maliki did only twice in eight years.

Al Abadi has fired incompetent and corrupt military commanders appointed by Al Maliki and rooted out 50,000 so-called ghost soldiers, no-show troops for whom commanders nevertheless collect salaries.

In his signature success so far, Al Abadi reached a deal to share oil revenue with the Kurds in northern Iraq, an issue Al Maliki had pushed nearly to the point of Kurdish secession.

“He is doing all the things we feared he wouldn’t be doing,” said Gyorgy Busztin, the deputy special representative for the United Nations in Iraq. “I respect him more and more each day.”

While many officials credit Al Abadi’s conciliatory style for much of the improved political atmosphere, they say the changes also point to a larger shift: a new sense of urgency among Iraq’s leaders that finally - after years of crises - the country could break apart in the face of the threat from the Daesh. The Islamist extremist group’s march across a vast swath of Iraq has been aided by the sectarian hostility that Al Maliki’s rule inflamed.

“Almost everyone recognises that this is the last chance for this country to survive as Iraq as we know it,” said Ayad Allawi, an Iraqi vice president who was appointed by Al Abadi to oversee reconciliation programmes.

He added, of Al Abadi, “everyone is giving him a chance.”

Still, the obstacles facing Al Abadi’s government remain vast.

Kirk Sowell, a Jordan-based political risk analyst and publisher of the newsletter Inside Iraqi Politics, said that even though Al Abadi had succeeded in doing away with sectarian intimidation, “at the same time, it’s important to say how weak he is.”

A third of the country is beyond Al Abadi’s control and in the hands of militants. As commander-in-chief, he does not even control all of the country’s security forces. While attempts have been made to bring Shiite militias under government control, the reality is that many operate with impunity and continue to commit abuses against Sunnis, human rights activists say.

Ominously, Al Abadi also faces constraints from hard-line factions within his own Shiite constituency.

Osama Nujaifi, the Sunni vice-president, said that even though Sunni officials were optimistic about Al Abadi’s intentions, they remained worried about the “old guard,” a reference to Al Maliki and his cronies, who many believe are working behind the scenes to undermine Al Abadi.

“Al Maliki is absolutely convinced that he will be back sometime in 2015,” said one Western official, speaking on condition of anonymity to avoid angering Iraqi officials.

In the Al Alwani case, Al Abadi’s advisers, as well as diplomats and other Iraqi officials, saw something sinister at work: the hand of Al Maliki, whom many believe still exerts influence within Iraq’s judiciary. Al Abadi’s advisers privately say they were shocked at the verdict, especially because Al Abadi himself, according to Nujaifi, had privately asked Iraq’s top judge to delay a decision.

“Al Maliki’s control over the justice system was on full display” in the Al Alwani death sentence, wrote Renad Mansour, an Iraq scholar at the Carnegie Endowment for International Peace.

For their part, Al Maliki’s supporters deny that the former prime minister is working against Al Abadi, although they have begun publicly criticising the new prime minister’s policies.

Abbas Al Moosawi, a spokesman for Al Maliki, said, “Al Maliki had nothing to do with the Al Alwani death sentence, and he never interferes.”

More broadly, Al Moosawi said it was too early to assess Al Abadi’s performance in office, but said Al Maliki believed it was “incorrect” that there were more than 50,000 ghost soldiers on Defence Ministry payrolls, as Al Abadi has claimed, and asked for a parliamentary investigation into the matter.

Balancing two imperatives — accommodating Sunni concerns without alienating Shiites — has required Al Abadi to walk a fine line, sometimes taking private actions that diverge from his public comments.

In the Al Alwani case, for instance, Al Abadi gave private assurances to Al Alwani’s tribe and Sunni leaders that there would be no execution. Publicly, however, he supported the independence of the judiciary, saying he had no right to intervene. He even criticised a recent Human Rights Watch report that urged him to order a stay of execution and highlighted claims that Al Alwani, who has denied firing the weapon that killed the two soldiers, had been tortured and was refused access to lawyers.

Still, it was clear that the verdict posed a crucial moment for Al Abadi. Al Alwani’s own tribe was fighting alongside the government in Anbar province, and after the death sentence threatened to lay down their guns.

Shaikh Adnan Al Mahnna, a tribal leader in Ramadi and Al Alwani’s uncle, said he was satisfied with how Al Abadi had handled the case, and that for now his men would keep fighting the Daesh.

“We are fighting [Daesh]; we will keep fighting [Daesh] unless the government breaks its promises on this case,” he said.

On other major issues, including the accord with the Kurds and an internationally backed plan to establish Sunni-led National Guard units to bolster the government’s security forces, Al Abadi continues to face pushback from fellow Shiites, especially Al Maliki.

Al Maliki has opposed the deal with the Kurds, called the fall of Mosul to the Daesh in June a conspiracy orchestrated by the Kurds and warned against arming Sunni tribes to fight the Daesh. He has also travelled, tending to his relationships with regional Shiite powers, meeting Hassan Nasrallah, the leader of the militant Shiite movement Hezbollah in Beirut, and top officials in Iran.

Al Maliki has also refused to vacate his prime minister’s offices and palace in Baghdad’s Green Zone, but has given up his state-owned jet.

In taking on corruption within the military, and removing officers who were loyal to Al Maliki, Al Abadi is making plenty of enemies, and fears for his safety have been raised in conversations within the Green Zone. This is Iraq, after all, where the usual exit from power is the coffin.

Visiting the city of Karbala recently ahead of an important Shiite religious holiday to mark the martyrdom of Imam Hussain, Al Abadi said he would continue to root out corruption in government ministries.

He vowed not to back off, “even if I get assassinated because of it”.

— New York Times News Service