Baghdad: As Iraqi forces battled Daesh, former General Abdul Karim Khalaf came to a sad realisation — they were fighting against some of his former army comrades.

The tactics Daesh used — from the way they dug tunnels to their construction of defences — were lifted straight from the manual of the old Iraqi armed forces under dictator Saddam Hussain.

“They had expertise and methods inherited from the army,” retired army commander Khalaf told AFP. “They knew us.”

When the US-led invasion toppled Saddam 15 years ago in 2003 it splintered Iraqi society and fractured loyalties among those who had served in the country’s armed forces.

One of the first decisions made by Paul Bremmer, the American head of the occupation authority, was to dismantle all security forces in the country.

That controversial move would come back to haunt US-led forces as it pushed many members of Iraq’s disbanded military, police and intelligence agencies to join movements fighting against them.

“Saddam-era military expertise was critical to the development of the insurgency”, said Fanar Haddad, an Iraq expert at the Middle East Institute.

The seepage of knowledge from Iraq’s former security forces into the insurgency came to devastating fruition when Daesh stormed across Iraq and northern Syria in 2014.

Among the group’s leadership were veterans of Saddam’s forces who put their training to use conquering territory and running the self-declared “caliphate”.

Former Republican Guard officer Fadel Ahmad Al Hayali was second-in-command to Daesh chief Abu Bakr Al Baghdadi until he was killed in an October 2015 air strike near Mosul in northern Iraq, the US has said.

As Baghdadi’s deputy, he was in charge of arms transfers, explosives, vehicles and people between Iraq and Syria.

Another veteran was Samir Abd Mohammad Al Khlifawi, called the group’s “most important strategist” by German weekly Der Spiegel.

Using the nom de guerre Haji Bakr, the former air force intelligence officer helped devise plans used by the group to take control of northern Syria before he was killed by rebels in 2014.

Hisham Al Hashemi, an expert on extremists movements, said these were not isolated examples as Daesh filled its military and security bodies with former Saddam-era officers.

When the government launched its gruelling fight back against Daesh, it too relied on officials from the previous regime.

Key commanders, including the leaders of Iraq’s elite counterterrorism units, were “former soldiers under Saddam” who had been reintegrated into the forces set up after the 2003 invasion, Hashemi said.

With a US-led coalition backing them up in the skies above, Iraqi forces overcame their opponents after a protracted and bloody campaign that saw some of the world’s fiercest urban fighting in decades.

Ultimately the familiarity between the two sides gave Baghdad a key advantage that allowed it to declared victory over Daesh at the end of last year.

“The army won because they knew Daesh used the methods of Saddam Hussain’s special forces and were able to anticipate their movements,” Hashemi said.

Beating back Daesh has been hailed as a major turning point for Iraqi forces that retreated in disarray when the extremists first struck in 2014.

The brutal fight was the latest — and most vicious — testing ground for capabilities honed in the 15 years of chaos since the ouster of Saddam.

For former General Khalaf the triumph was also at least in part down to the know-how gleaned by the armed forces back before the US-led invasion turned Iraq on its head.

“Iraqi forces knew the nature of the battle and the geography of the terrain,” he said.

“We understood how the enemy fought, and all of this came from reflexes acquired in the army.”