BAGHDAD (Reuters)- - As fighting in Iraq raged last summer, Iranian Major-General Qassem Soleimani came across unexpected opposition to his plans to defeat Islamic State.
Soleimani is the commander of Iran's al-Quds brigade and has been a key figure in the fight against the Sunni Islamist group in Iraq. That fight has been led not by Iraq's army but by Iranian-backed Shi'ite militias.
But in August, Iraqi Prime Minister Haider al-Abadi told Soleimani that a planned assault on the Sunni city of Ramadi should be left to the Iraqi army, according to a government official and two diplomats.
Abadi, a 64-year-old Shi'ite, wanted the militias to stay away to avoid inflaming ethnic tensions, the sources said.
Abadi's office declined to comment on the story, which has been repeated in Baghdad's diplomatic circles for months. Three Iraqi politicians denied it ever happened.
But the government official and the diplomats said the incident was one of a series of moves by Abadi to assert his authority as leader and to distance himself from Tehran and the militias that came to Baghdad's rescue in 2014 and early 2015.
Abadi has begun to push for reconciliation between Iraq's Shi'ites and Sunnis, and for better relations with Sunni Arab neighbours like Saudi Arabia, they said.
If he can bridge the gap between rival sectarian communities as he has promised, he will have gone a long way towards reuniting a country which has been deeply riven since the fall of Saddam Hussein in 2003.
According to the government official and the two diplomats, Abadi also objected to Soleimani's plane landing at Baghdad airport without prior permission. Abadi was also irritated that Soleimani used an official VIP hall at the airport when entering Iraq, even though he was not officially invited by the government.
The deterioration in their relationship, the sources said, began in August when Soleimani attended a top Iraqi security meeting run by Abadi and behaved in, what one source said, was "a bossy manner as if Iraq was an Iranian protectorate".
This, the sources said, had led Abadi to ask Soleimani why he was at the meeting. The Iranian general had then left.
"Abadi questioned his presence. It was a matter of Iraqi sovereignty and nationalism," one Western diplomat said. Abadi's office declined to comment.
The Iraqi government official said Abadi and Soleimani had not fought but were "keeping an operational, business-like relationship. We can't say it's warm".
Whatever the case, Soleimani has receded from public view in Iraq in the past six months. The omnipresent posters and television images of him on the battlefield have all but disappeared.
There are likely to be limits to that change. Iran's allies within Abadi's Shi'ite camp are pushing back against his more muscular stance, while the collapse in oil prices has cut the government budget, said Hisham al-Hashemi, an Iraqi government adviser and an expert on Islamic State.
For now though, Abadi seems to be trying to deliver on his initial address to parliament in 2014 in which he painted a vision of a decentralised and united Iraq.
The army's victory in Ramadi against the ultra-hardline Sunni militant group was a key moment.
An elite corps of the Iraqi army dislodged Islamic State from the city, the largest in western Iraq, in the final days of 2015. Support came from U.S. warplanes while Sunni tribesmen held the ground behind the army lines.
The army is now preparing to take on Islamic State in Falluja, a bastion of Sunni jihadists to the west of Baghdad, and plans to start a push towards Mosul, the largest northern city. It was the fall of Mosul to Islamic State in 2014 that forced the exit of Abadi's predecessor Nuri al-Maliki. Many Iraqi lawmakers blamed Maliki for the Iraqi army's defeat in the city. Crucially, Maliki lost the backing of Grand Ayatollah Ali al-Sistani, a reclusive octogenarian who enjoys almost mythical status among millions of Shi'ite followers and wields authority that few Iraqi politicians openly challenge.
Sistani called for a consensus candidate. Abadi was Maliki's replacement, in part because he promised to heal the sectarian rift between Iraq's Shi'ite and Sunnis.
The new prime minister grew up in Baghdad amongst Sunni, Christians and other communities.
"His father was a prominent doctor. (Abadi) is used to living with other communities," said Mustafa Alani, an Iraqi security analyst with the Geneva-based think-tank Gulf Research Center.
After more than 20 years in exile in Britain where he studied in the northern English city of Manchester and worked as an electrical engineer, Abadi returned to Iraq in 2003 following the U.S.-led invasion that toppled Saddam's Baath party.
Like Maliki, Abadi is a member of the Shi'ite Dawa Party, which along with other Shi'ite groups carried out a U.S.-initiated de-Baathification campaign, effectively removing Sunnis from state, army and police positions.
A decade ago, Abadi backed that campaign. But when he became prime minister he promised to unite the country. At first, he struggled to assert himself. Some U.S. officials then perceived him as a weak leader who needed the backing of the militias.
But in the past few months that perception has begun to shift. On Feb. 9 he renewed a bid to dismantle the country's patronage system and root out corruption. Abadi said he wants a government reshuffle with technocrats as ministers.
The move surprised several groups of his ruling coalition, the government official said. "He made the announcement straight to the media, without consulting the party leaders."
Abadi has also improved relations with Iran's regional rival Saudi Arabia. In December, Riyadh reopened its embassy in Baghdad, 25 years after it shut following Iraq's invasion of Kuwait. Saudi Ambassador Thamer Al-Shabhan told newspapers the move would enable greater cooperation against extremism.
The closer ties survived their first test in January, when Saudi Arabia executed Shi'ite cleric Nimr al-Nimr. The Iraqi government resisted pressure from Shi'ite groups to break off ties and instead offered to mediate between Riyadh and Tehran.
"Abadi has kept himself at arm's length" from Iran, said a European diplomat. "He has only been to Tehran two or three times in 18 months, not like his predecessor who would go all the time."
Convincing Sunni Iraqis that he is sincere will not be easy. Parliamentary speaker Salim al-Jabouri, the most senior Sunni in the Iraqi state, said Abadi is showing good intentions but "does not use all of his authority to do what he promised to do".
Many Shi'ite politicians feel like Abadi is already too accommodating. Shi'ite political parties continue to back de-Baathification measures affecting tens of thousands of Sunnis. They also oppose the creation of a National Guard that would incorporate provincial forces like the Sunnis who are fighting Islamic State.
The government official said most Shi'ite politicians still have a strong anti-Sunni feeling. After Abadi's recent call for reforms, some Shi'ite government officials even discussed replacing the prime minister, the official said.
The European diplomat said the resistance Abadi faced made it hard to implement real change. "The feeling remains that Sunnis should pay the price for what they have done under Saddam," he said.
The sharp drop in oil prices and growing economic crisis in Iraq make things even harder."For the prime minister you can't not spend on the military,otherwise you can't defeat (Islamic State)," the same diplomat said. "He has a lot less money to play with than any of his predecessors have had since 2003."
Abadi's limited influence on the Shi'ite militias was apparent in January when his government failed to stop revenge attacks on Sunni civilians after Islamic State carried out a series of bombings east of Baghdad.
"Instead of holding Shi'ite militias to account the authorities have turned a blind eye to this shocking rampage. In some cases abductions and killings took place in full view of local authorities, who failed to intervene," said James Lynch, Deputy Director of Amnesty International's Middle East and North Africa Programme.
Reporting by Maher Chmaytelli; Editing by Samia Nakhoul, Simon Robinson and Peter Millership