Prime minister Haider Al Abadi said corruption was to blame for the emergence of ISIL in Iraq and must be eradicated from the country.

“Corruption is a scourge that has led to the formation of a terrorist organisation that managed to control two-thirds of Iraq’s territory in 2014,” Mr Al Abadi told officials on Saturday at a national security conference called by him following the defeat of the extremist group.

Iraq has faced significant corruption challenges since the overthrow of Saddam Hussein's regime in 2003.

In 2015, an Iraqi parliamentary panel called for former prime minister Nouri Al Maliki to face trial over the fall of the northern city of Mosul to ISIL, which allowed the extremists to seize large amounts of weapons and military equipment abandoned by the fleeing Iraqi forces.

Mr Al Maliki, who is now one the country’s three vice presidents, was among dozens of Iraqi officials named in the panel's report on why the city was captured with little resistance in June 2014.

He was blamed for allowing corruption to thrive during his term as prime minister, including in Iraq’s security forces. He was also blamed for creating sectarian tensions, leading to an increase of discontent in Sunni Arab areas that were captured by ISIL.

The extremist group at one point controlled much of northern and western Iraq but was driven back by Iraqi forces with support from an international coalition led by the US. After more than two years of fighting, Mr Al Abadi declared victory over ISIL on December 9.

After a tough but successful military campaign our counter-terrorism efforts need to focus on security and intelligence measures to protect gains made against Daesh. The professionalism of our security services and the cooperation of our citizens will help achieve lasting peace pic.twitter.com/qrzmBMh0so — Haider Al-Abadi (@HaiderAlAbadi) December 23, 2017

Mr Al Abadi on Saturday warned Iraqis “not to underestimate ISIL capability to re-emerge”.

“We should not lose victory by negligence here or there, and we should not allow terrorism to rise again,” he said.

لايجوز ان نضيع النصر بغفلة هنا او هناك وان لا نسمح للارهاب بان يحقق اي خرق، فالعدو لديه فكر منحرف ويجب ان نكون بمستوى التحدي من خلال تركيز الجهود الاستخبارية والامنية pic.twitter.com/dvyg9sveO3 — Haider Al-Abadi (@HaiderAlAbadi) December 23, 2017

Iraq had emerged from the war against ISIL “victorious and united”, the prime minister said, adding that “nepotism within security forces is the most dangerous aspect of corruption”.

Iraq was ranked 166 out of 176 nations in Transparency International's Corruption Index for 2017, which said the country continued to score among the worst in the world on corruption and governance indicators.

Mr Al Abadi said that “corruption cannot be tolerated and must be eradicated” and that doing so in the country's security and intelligence services was "Iraq’s next challenge”.

Read more: Iraq needs a long-term strategy as much as it needs short-term wins

The issue of corruption is also affecting Iraq's semi-autonomous Kurdish region, where two political parties have withdrawn from the regional government following days of protests.

Thousands of Kurds have taken to the streets of Sulaimaniyah since last Tuesday to complain about corruption, delayed salaries and poor services.

Kurdistan insulated itself against violence plaguing the rest of the country following the 2003 US-led invasion of Iraq and enjoyed a decade-long economic boom fuelled by rising Iraqi oil revenues, of which the region received a share.

The bubble began to deflate in early 2014 when the central government in Baghdad slashed funds to the Kurdish Regional Government after it built its own oil pipeline to Turkey in pursuit of economic independence.

Tensions have been high in the region since Baghdad imposed tough economic measures in response to a Kurdish independence referendum on September 25.

The Iraqi government responded by seizing Kurdish-held Kirkuk and other territory disputed between the Kurds and the central government. It also banned direct flights to Iraqi Kurdistan and demanded control over border crossings in the region.