Iraqi Prime Minister Haider al-Abadi is triumphant as he describes his country’s security forces driving out Isis from its last strongholds in western Iraq. “Our advances have been fantastic,” he said in an interview with The Independent in Baghdad. “We are clearing the deserts of them right up to the border with Syria.” Isis is being eradicated in Iraq three years after its columns were threatening to capture Baghdad.

Once criticised as vacillating and weak, Mr Abadi – who became Prime Minister in August 2014 – is now lauded in Baghdad for leading the Iraqi state to two great successes in the past four months: one was the recapture of Mosul from Isis in July after a nine-month siege; the other was the retaking of Kirkuk in the space of a few hours on 16 October without any resistance from Kurdish Peshmerga.

The son of a neurosurgeon in Baghdad, Mr Abadi, 65, spent more than 20 years of his life in exile in Britain before the fall of Saddam Hussein. Trained as an electrical engineer, he gained a PhD from the University of Manchester, before working in different branches of industry. A member of the Shia opposition Dawa party from a young age, two of his brothers were killed by Saddam Hussein’s regime and a third imprisoned. He returned to Iraq in 2003 where he became an MP and a leading figure in the ruling Dawa party.

As the man with the strongest claim to be the architect of the two biggest victories ever won by the Iraqi state, Mr Abadi’s reputation has soared at home and abroad. He is particularly pleased that there were so few casualties when Iraqi forces retook the great swath of territory disputed with the Kurds, which stretches from Syria in the west to Iran in the east. “I gave orders to our security forces that there should be no bloodshed,” he says, explaining that fighting the Peshmerga would make reconciliation difficult between the Kurds and the government.

The Iraqi Prime Minister Haider al-Abadi (right), pictured here during a meeting with US Secretary of State Rex Tillerson, has emerged with his reputation buoyed after successes over Isis and the Kurds (AP)

Soft-spoken and conciliatory, Mr Abadi is determined to end the quasi-independence of the Kurdistan Regional Government (KRG) that dates back to Saddam Hussein’s defeat after his invasion of Kuwait in 1991. He says: “All border crossings in and out of Iraq must be under the exclusive control of the federal state.” This includes the Kurdish oil pipeline to Turkey at Faysh Khabour, by which they once hoped would assure their economic independence, as well as the main Turkish-Iraqi land route at Ibrahim Khalil in the north west KRG. This crossing has been Iraqi Kurdistan’s lifeline to the rest of the world for a quarter of a century. Iraqi officials will likewise take over the international side of the airports in the Kurdish cities of Irbil and Sulaimaniyah.

These administrative changes do not sound dramatic, but they effectively end the semi-independence of the Iraqi Kurds which they had built up over the past 26 years. Kurdish president Masoud Barzani, who is to give up his post on 1 November, put these gains at risk when he held a referendum on Kurdish independence on 25 September.

Mr Abadi is in a strong position because the KRG’s two biggest neighbours, Turkey and Iran, agree with him on re-establishing federal control of the border and Kurdish oil exports. Mr Abadi says the Turks admit that “they made a mistake” in the past in dealing directly with the KRG and not with the central government in Baghdad. He emphasises that he will not be satisfied with Iraq government officials having a symbolic “spot” at different crossing points on the border, but they must have exclusive control of borders and international flights. Asked if this would include visas, Mr Abadi says: “This is a must.”

He wants the Peshmerga either to become part of the Iraqi government security forces or a small local force. He is curious to know how many Peshmerga there really are, expressing scepticism that there are really 300,000 men under arms as claimed by the Kurdish authorities. He says: “I have been told by many leaders in Kurdistan that there is a small fighting force and the rest stay at home.”

He recalls that when he became Prime Minister in 2014 after Isis unexpectedly captured Mosul, he made inquiries as to why five Iraq divisions had collapsed. He found that the main reason was corruption and in many units half the soldiers were drawing their salaries but were not there. He suspects the Peshmerga operate the same corrupt system, which he says would explain “why they failed to defend the borders of KRG [against Isis] in 2014 and had to seek the help of the US and Iran”.

The number of the Peshmerga may be in dispute, but Mr Abadi is adamant that “I am prepared to pay those Peshmerga under the control of the federal state. If they want to have their local small force – it must not be that large – then they must pay for it.” He says that the KRG must not become “a bottomless well” for federal payments. He would also expect Kurdish government expenditure to be audited in the same way as spending in Baghdad.

If all these changes are implemented then Kurdish autonomy will be much diminished. It is easy to see why Mr Barzani is stepping down to avoid the humiliation of giving up so much of his authority. Resistance by the Kurdish leadership will be difficult since they are divided and discredited by the Kirkuk debacle. But Mr Abadi’s strength is that for the first time since 1980, the Kurds do not have any backers in neighbouring states and the US has done little during the crisis except wring its hands at the sight of its Kurdish and Iraqi government allies falling out. When Mr Barzani unwisely forced Washington to choose between Baghdad and Irbil, the Americans were always going to choose the Iraqi state.

Iraqi forces enter Kirkuk Show all 8 1 /8 Iraqi forces enter Kirkuk Iraqi forces enter Kirkuk Iraqi forces flash the sign for victory as they head towards the city of Kirkuk AFP/Getty Images Iraqi forces enter Kirkuk Iraqi people gather on the road as they welcome Iraqi security forces members REUTERS Iraqi forces enter Kirkuk Iraqi children wave to Iraqi forces as they arrive AFP/Getty Images Iraqi forces enter Kirkuk Iraqis wave to Iraqi forces as they arrive in the first neighbourhood on the southern outskirts of Kirkuk AFP/Getty Images Iraqi forces enter Kirkuk A burnt Kurdistan flag is seen in Kirkuk REUTERS Iraqi forces enter Kirkuk Iraqi forces advance towards the city of Kirkuk AFP/Getty Images Iraqi forces enter Kirkuk Iraqis wave to Iraqi forces AFP/Getty Images Iraqi forces enter Kirkuk A member of the Iraqi forces walks past a defaced Kurdish flag painted on concrete blocks AFP/Getty Images

Queried about Iranian influence on the Iraqi government. Mr Abadi is exasperated and derisive by turns, particularly about Qasem Soleimani, the director of foreign operations of the Islamic Revolutionary Guards Corps (IRGC) whose negotiations with the Kurdish leadership have been reported as playing a decisive role in the retreat of the Peshmerga from Kirkuk.

“He definitely didn’t have any military role on the ground in the crisis [over Kirkuk],” says Mr Abadi. “I can assure you that he had zero impact on what happened in Kirkuk.” Mr Abadi says that it was he himself who called the Kurdish leadership and persuaded them not to fight and to withdraw the Peshmerga from the disputed territories.

A more substantive allegation is that the Hashd al-Shaabi, the powerful Shia paramilitary units which have fought alongside the Iraqi regular forces, are sectarian and under Iranian influence or control. Asked about his recent meeting with Rex Tillerson, the US Secretary of State, who said the Hashd should “go home” or be dismantled, Mr Abadi said that there was either “a misquotation or misinformation” and Mr Tillerson seemed to be under the impression that the IRGC was fighting in Iraq and did not know that the Hashd were all Iraqis.

He said that Iraq had plenty of foreign advisers from the US, UK, France and elsewhere, including Iran, but the number of Iranian advisers was only 30, well down from 110 a few years ago. As for the Hashd, he said they had to be under government control, well-disciplined and to have no political role, particularly not in the Iraqi general election on 12 May 2018 which he pledged not to postpone.

Mr Abadi is in a strong position because he is one of the first Iraqi leaders whose government has good relations with all Iraq’s neighbours: Turkey, Iran, Kuwait, Saudi Arabia, Jordan and Syria. Iraq, a country deeply divided between different sects and ethnic groups, has traditionally been destabilised by domestic opponents of the central government combining with state sponsors abroad who supply money, weapons and a sanctuary. This is not happening for the moment, which is why the Kurdish leadership is so isolated.

Part of Mr Abadi’s success during the Kirkuk crisis stemmed from disastrous miscalculations made by Mr Barzani about the reaction of Baghdad and the rest of the world to the independence referendum. Bur Mr Abadi showed an acute sense of how to exploit his opportunities.Turkey and Saudi Arabia, who once supported or tolerated al-Qaeda type organisations operating in Iraq, now fear them and are frightened of their dispersal as the self-declared Caliphate is destroyed.