The Iranian “Mr. Fix-It” is turning the Iraqi Prime Minister Against Iran.

Qassem Soleimani has many nicknames, generally containing one or both of the words “shadow” or “dark.” However, the commander of the Iranian Revolutionary Guard Corps’ Quds Force has been operating in the light since the devastating advance of the Islamic State of Iraq and al-Sham (ISIS) began in the summer of 2014, but a year later is seeing him begin to wear out his welcome with Iraqi Prime Minister Haider al-Abadi.

Tasked with organizing the defense of the Shi’a holy sites in central Iraq and leading the Shi’a militias called up in the panic following the collapse of the Iraqi Security Forces (ISF), Soleimani has been seen regularly on the front lines and in Baghdad. With the power of the militias behind him, he has come to be seen as attempting to assert himself as the power behind the government, Iraq’s very own eminence grise.

The past month, though, has seen an ever-wider rift growing between Prime Minister Abadi and Soleimani, one that may threaten the relationship between Iran and Iraq as a whole. Abadi once spoke respectfully about Soleimani and Iran’s role in the country and the fight against ISIS. While perhaps not warmly, it was at least grateful and realistic about the need for Iranian assistance.

That has changed dramatically, though. Luckily, perhaps, for Abadi, events on the streets are working in his favor. The popular protests against corruption and government inefficiency that have spread around Iraq have crossed sectarian lines, but have been particularly aggressive towards Shi’a politicians in the south of the country. Long-seeking the support for wide-ranging reforms, Abadi leapt at the chance to introduce anti-corruption measures and a purge of the government ranks. An ambitious seven-point plan of reforms was passed by the parliament, recognizing the support Abadi had and themselves eager to placate the protesters.

Security details for ministers and other ranking members of the government were massive, often running into the hundreds; Abadi has ordered these details cut dramatically and the extras shipped off to the front line to fight ISIS. Corruption investigations would be opened, and older ones re-opened. Sectarian quotas, which dictated how government positions would be parceled out, were now to be disregarded in favor of a merit-based appointment system.

The posts of Vice President and Deputy Prime Minister were henceforth canceled. While outwardly seeming like a simple initiative, cutting another piece off the bloated bureaucracy, it also meant Abadi had made a momentous decision. One of those Vice Presidents was none other than Nouri Al-Maliki, the previous Prime Minister, who still commanded significant power in the country. Abadi had just fired Maliki.

That wasn’t all Abadi had in store for Maliki; a parliamentary investigation into the fall of Mosul to ISIS last year that found him to be among those responsible was turned over to prosecutors. Maliki is now facing the possibility of a public trial in both military and civilian courts for his role. Rumors out of Baghdad say that members of Maliki’s State of Law Coalition could bolt to other parties as his fall from grace continues.

Abadi also has the support of two very important leaders in Iraq. The first is Shi’a cleric, political figure, and militia leader Muqtada al-Sadr who, with his parliamentary bloc, has welcomed Abadi’s efforts. Considered one of “Iran’s Men” in Iraq during the insurgency against American forces, his bloc is now openly supporting a Prime Minister who is moving against Iranian interests in the country.

More importantly, Abadi has the support of Grand Ayatollah Ali al-Sistani, Iraq’s top cleric and perhaps the single most important person in the country, who urged Abadi onwards and to push aside anyone “who tries to hinder reform, no matter what their position is.”

It also helps that Abadi has the United States of America and Europe firmly behind him, although he could use more tangible support from the West and his Arab neighbors.

Prime Minister Abadi put up with Soleimani’s role, and increasingly open arrogance towards the government, mostly because he was new to office and was not particularly secure in this role. Abadi is now just passing the one-year in office mark, and has begun pushing back against Iran in general, but Soleimani in particular.

In early August Abadi ordered that shipments on Iranian planes stopping at Baghdad’s airport be searched in line with regular customs code. These planes were seen as carrying supplies for picked pro-Iranian elements Popular Mobilization Forces, which are a mostly-Shi’a militia force, or even destined for Assad regime forces in Syria. In a dramatic confrontation in mid-August, airport authorities demanded an Iranian plane be unloaded and its containers searched, which lead to Revolutionary Guards forces and Iranian diplomats rushing to the scene.

Although the plan eventually was reloaded and left, it was a clear sign that the Iraqi government was no longer going to allow its airports to be used as a way-station for Iranian arms shipments.

In an incident that quickly spread around Iraq, Abadi and Soleimani had a disastrous meeting in mid-August that led to the latter having the leave the room (some stories claim that Abadi actually kicked him out of the meeting). Accompanying former Prime Minister Nouri Al-Maliki to a gathering of the Iraq’s Shi’a political leaders, Soleimani reportedly launched into a tirade against the proposed reforms spurred by the onset of protests around the country, and especially what he perceived to be impending attacks on Maliki.

Soleimani was met head-on by Abadi, who launched a heated counterattack in which he defended the reform plans and asserted his authority as a Prime Minister who had the support of the people and the religious establishment. The entire room was said to be shocked by Abadi’s blistering rhetoric and his boldness “to deal what seemed like a humiliating [blow] to a personality of Soleimani’s stature.” Soleimani, incensed, had no choice but to leave the meeting.

Although Abadi seems to have the upper hand over Soleimani at this point, that does not mean that the Prime Minister is facing an easy battle. Deputy Justice Minister Abdul Karim al-Faris was kidnapped in Baghdad by gunmen in SUVs, just a week after 18 Turkish workers were also kidnapped. While it is still unknown who is responsible, fingers are being pointed at Shi’a militias, who play a major role in providing security in the city. However, this leading role has led to accusations of abuse of power and human rights abuses.

Despite recent victories against Qassem Soleimani and Iranian allies in Iraq, the Prime Minister is facing off with a man who is still immensely powerful, backed by tens of thousands of militiamen, not to mention the Iranian government itself. However, in standing up for himself, Abadi is showing that he is more than ready to assert himself as the leader of Iraq and someone who is not beholden to Iranian goodwill. Whether this is setting up a more dramatic series of confrontations with Soleimani and Iran remains to be seen.