(File photo: VCG)
As Iraq tries thousands of locals and foreigners accused of joining the Islamic State group, experts warn its jails could once again become "academies" for jihadists.
Prison was a pivotal moment for many prominent jihadists -- not least of them Abu Bakr al-Baghdadi, IS's Iraqi supremo who remains at large despite the collapse of his "caliphate" in March.
Baghdadi was held in Camp Bucca, a sprawling US-run complex in the southern Iraqi desert, where he is thought to have essentially "come of age" as a jihadist leader.
"For many members of such groups, prison was one of multiple 'stages' of jihad," said Hisham al-Hashemi, an expert in Iraqi jihadist movements.
They ran their own religious studies courses and even planned attacks on civilians or ordered assassinations of security forces from within the prison walls.
"The cells become the equivalent of academies -- even if there's just one prisoner with extremist thoughts, he can recruit the rest," Hashemi told AFP.
Iraq has already condemned hundreds of its own nationals as well as scores of foreigners to life in prison for joining IS.
It has begun trial proceedings for another 900 Iraqis recently repatriated from neighbouring Syria and has offered to try foreigners stuck in legal limbo there, too.
But its prison system is the subject of fierce criticism.
Advocacy groups accuse security forces of using circumstantial evidence to detain people on terrorism charges, extracting confessions under torture and keeping suspects in overcrowded cells with no access to lawyers.
Cells built to hold around 20 detainees are often packed with 50, a source working in the jails told AFP, and prisoners are often caught smuggling phones or passing on information during family visits, especially to their wives.
Those arrested for petty crimes are often held with hardened jihadists, which has facilitated recruitment in the past, said security analyst Fadel Abu Raghif.
"Most of those detained were Islamic jurists and thinkers. They're able to argue, provide evidence, brainwash and persuade people," he told AFP.
Those recruited in jail are typically not religiously orthodox to begin with, but have instead been drawn by "rhetoric playing on a narrative of oppression", Abu Raghif added.
In the aftermath of Saddam Hussein's toppling by US-led forces in 2003, insurgent groups seized on the feeling of marginalisation among the country's Sunnis as fodder for recruitment.
More than fifteen years later, observers fear that same perception of persecution is back.
The Soufan Center, a New York-based think tank, said Iraq "suppressed, but never actually addressed" the grievances of its Sunni communities.
The deployment of the mostly-Shiite Hashed al-Shaabi paramilitary units in Sunni-majority areas recaptured from IS "has fuelled sectarian resentment among local populations", the Center wrote this month.
That anger could pave the way for a repeat of the mid-2000s: "As happened before with Camp Bucca, these detention centres are becoming breeding grounds for radicalisation."
No repeat of Bucca
Iraq's government has declined to provide figures on detention centres or prisoners, including how many are facing terrorism-related charges, although some studies estimate 20,000 are being held for purported IS links.
Some facilities have shut down in recent years, including the Abu Ghraib complex that became infamous for prisoner abuse during the US-led occupation.
Others were rocked by riots and prison breaks that allowed detainees accused of "terrorism" to escape.
Now, with more repatriated fighters expected to arrive in the coming months, observers fear an already-strained system will be flooded.
"The prisons that are being used definitely are insufficient in capacity to hold potentially, thousands of extra people that will be transferred," warned Belkis Wille of Human Rights Watch.
HRW has called on the international community to help Iraq improve its judicial processes and revamp its jails -- but Iraq, Wille said, may have something else in mind.
"The authorities are very conscious, and do not want something like Abu Ghraib or Bucca to happen again," she told AFP.
"It is a part of the reason why so many of the suspects are getting the death penalty or life (in) prison. I think the intention is that these people would not come out of prison, so you would not have the same dynamic."