In France, the path to radical Islam often begins with a minor offence that throws a young man into an overcrowded, violent jail and produces a hardened convert ready for jihad.
With the country on heightened security alert since January when French troops began fighting al Qaeda-linked Islamists in Mali, authorities are increasingly worried about home-grown militants emerging from France's own jails.
But despite government efforts to tackle the problem, conditions behind bars are still turning young Muslims into easy prey for jhadist recruiters, according to guards, prison directors, ex-inmates, chaplains and crime experts interviewed over the last few months by Reuters.
"I have parents who come to me and say: 'My son went in a dealer and came out a fundamentalist'," said Hassen Chalghoumi, imam of the mosque in Drancy, a gritty suburb north of Paris.
Malian Islamists have warned France it is a target for attacks, most recently in a video that came to light on Tuesday. This has added to concern in a country which, according to the Europol police agency, arrested 91 people in 2012 on suspicion of what it categorized as religiously-inspired terrorism.
These numbers are by far the highest for any European Union country, although tiny when compared with France's estimated 5 to 6 million Muslims, the overwhelming majority of whom are peaceful, law-abiding citizens.
France, which has Europe's biggest Muslim population, is not alone. International studies show that prison radicalization is a problem in countries ranging from Britain and the United States to Afghanistan. However, France stands out because over half its inmates are estimated to be Muslim, many from communities blighted by poverty and unemployment.
The two ethnic Chechen brothers suspected of last month's Boston bombings, while not former convicts, further underline the threat posed by "lone wolf" militants - young men from immigrant communities acting alone or in small groups who are lured into violent Islam.
One such was Mohamed Merah, who killed four Jews and three soldiers last year in and around the southern city of Toulouse. This marked the worst attack on French soil since 1995 bombings on the France's underground train network by Algeria's Armed Islamic Group (GIA) that killed eight and wounded scores.
Merah, 23, spent time in jail for violent theft. Another suspected French Islamist was radicalized behind bars before being shot by police in October.
In March an Islamist suspect was arrested on accusations of plotting an imminent bomb attack on French soil. He had spent five months in jail last year for drugs and theft offences.
"We're faced with an external enemy in Mali, but also an enemy from within who is the product of radicalization," said Interior Minister Manuel Valls, who acknowledged that Merah's killing spree had revealed a serious lapse in intelligence.
"They start as minor delinquents, move into selling drugs, sometimes do prison time and convert to radical Islam and hate towards the West," he told local media in February.
"A GOOD SCHOOL"
Noisy, dirty and smelling of garbage, Villepinte is the most crowded jail in the Paris region, called the "jungle" by guards. France's prisons watchdog, after a 2009 visit, described its inmates as "young, undisciplined and totally uncontrollable".
Brawls occur weekly and staff, many of them trainees, live in fear of attack. In January an optometrist was knifed in the eye with a pair of scissors. Absenteeism is sky-high among guards, who say they are overwhelmed by the daily challenge of keeping order.
"Islamic radicalization is a real curse in most of our prisons," Villepinte guard Blaise Gangbazo told Reuters. "But in tough jails like ours it comes about even more easily. It's a good school."
France's prison population has grown by a third in the past decade, partly due to policies under conservative governments of handing down heavy sentences on repeat petty offenders.
No official data exist but sociologist Farhad Khosrokhavar says about half the 67,674 prison population is Muslim, rising to 70 percent in some urban areas. This disproportionate ratio of young, disadvantaged Muslims is added to a toxic mix of overcrowding, overtaxed guards and a lack of mainstream Muslim chaplains to discourage radicalization.
Vulnerable young men typically arrive in jail, isolated from family and friends at a time of personal crisis, and become susceptible to recruitment by radicals. One such case was Karim Mokhtari, who at 18 was jailed for over six years for a botched robbery in which a man was shot.
While in jail in the northern city of Amiens, he met a soft-spoken older inmate who consoled him, invited him to pray and encouraged him to read the Koran in Arabic. "When you arrive in prison you feel completely abandoned. You get there and you need to find some strength," said Mokhtari.
"You're seeking hope and when someone holds out a hand, you take it," he said. However, in a subsequent encounter the new friend urged him to "kill the infidels wherever you find them".
"The idea was to go get myself trained and become a violent Jihadist," said Mokhtari, adding that the recruiters work on inmates' hostility to the prison system and to a country where they often have been unable to find work.
Nearly two decades ago Mokhtari resisted such pressure. Today, aged 35, he works with youth to keep them out of prison and has co-written a book, "Redemption", about his experiences.
Prison workers say the vast majority of Muslim inmates are not radicalized. Yet leaked U.S. diplomatic cables from 2005 cite a warning by French officials that the prisons and poor suburban neighborhoods were top recruitment areas for radical Islamists, and refer to a report by French intelligence services describing radicalized prisoners as "time bombs".
Chaotic jails bear the brunt of overcrowding due to constant arrivals of uncharged suspects, and in cells or the yard, petty hoodlums quickly cross paths with serious criminals.
"It's the little guys who bother us the most, because on the inside they meet the big guys. Then the consequences are bad," said Gangbazo, the Villepinte guard. "At our level, the guards are powerless against that."
UNDER THE RADAR
Justice Minister Christiane Taubira warned foreign journalists in March against overestimating the threat of prison radicalization, but added it was "certainly worrying".
Asked how authorities were tackling the problem, she cited measures to transfer inmates found to be proselytising to other jails, aiming to disrupt any recruitment efforts to radicalism.
This policy helps to control those prisoners already identified as radical Islamists, but not all recruiters have been convicted under France's anti-terrorism laws. The task is tougher with inmates serving terms for unrelated offences who have turned to radical Islam unnoticed by the authorities.
Untrained staff tend to confuse devout Muslims with potential radicals, said sociologist Khosrokhavar, author of a 2004 study commissioned by the Justice Ministry that was the first to highlight the level of Muslims in French jails.
"The whole attitude to radicalization is outdated," he said. "Those who become radicals are precisely those who do not show it. It happens without any kind of external signs like growing one's beard."
Another hurdle is that France's internal prison intelligence unit, known as EMS-3, has no judicial power, complicating moves to share information with the DCRI domestic security service.
"We send up a lot of pieces of information when we spot them except there's not enough information coming down to us from the DCRI," said Jimmy Delliste, director of the Saint-Etienne jail just outside Lyon. "That's a real problem."
To make matters worse, the prisons' EMS-3 is controlled by the justice ministry while the interior ministry directs the DCRI, both with distinct cultures, hierarchies and goals.
REAL OR FAKE RADICAL?
One way to thwart radical Islam in prison is through prison chaplains able to counter such messages with moderate teachings, security experts agree. But here too, France is falling short.
Despite a prison population dominated by Muslims, France has about 160 Muslim chaplains versus 700 Christian ones. Some estimate more than 80 percent of Muslim inmates never see a chaplain, increasing the risk of falling prey to radicals.
That contrasts with Britain, where about 200 Muslim chaplains address a Muslim prison population estimated at only a third of France's.
Abdelhak Eddouk, who was chaplain at the Fleury-Merogis jail outside Paris for nine years before he resigned recently, estimated at least 480 Muslim chaplains are needed, together with a clearer set of guidelines to help them in their task.
Government plans, by contrast, are to add just 30 this year and next - a figure Eddouk said was grossly insufficient to allow the chaplains time to get to know the real radicals and those parroting violent ideas as a form of protest.
"Either the guy is a real radical, or he's a fake radical," Eddouk said. "How am I supposed to know? After talking with him for 15 minutes, I can't."