Mohamed Merah grew up in one of the toughest housing projects of Toulouse, with his mother, two brothers and two sisters. At age five, his parents split up _ and he took that hard. As a youth he turned to petty crime, landing in prison twice.
How the young man described by one top official as a "little failure" went on to carry out France's biggest terror spree since the mid-1990s is provoking anguished questions in one of the West's most-seasoned terrorism-fighting nations.
Merah's weeklong motorcycle shooting rampage killed three French paratroopers, three Jewish schoolchildren and a rabbi, horrifying France and raising fears that al-Qaida had struck again in Europe. The 23-year-old himself bragged of affiliation to the terror network, but officials say no evidence has turned up of such ties.
In some ways, Merah came across as an ordinary, if troubled, youth.
A one-time auto body shop worker, Merah liked cars and motorcycles _ and enjoyed spinning out in vacant-lot "rodeos" with any car that he got his hands on, said a French official close to the investigation. Merah partied and was seen dancing at a nightclub days before his first suspected shooting, on March 11.
Behind the run-of-the-mill image hid "a second personality," said the official, who spoke on condition of anonymity due to the sensitivity of the case.
Bernard Squarcini, the head of the French police counterterrorism agency, told Le Monde newspaper that Merah had shown "psychiatric issues" in the past that may have contributed to his rampage.
What tipped the balance, Merah's former lawyer said, was his anger over what he saw as an unjust prison sentence and a failed effort to join the military.
"That laid the groundwork from which he threw himself into this religious fanaticism, in a spirit of vengeance" against the French state, lawyer Christian Etelin said.
While Merah enjoyed nightlife, the Frenchman of Algerian descent also moved in a crowd of ultraconservative Muslims. During the police standoff that ended Thursday with him being shot dead, Merah said he'd grown more radical in prison, often reading the Quran alone.
Unlike his fellow Salafis, however, Merah was not considered much of a thinker and displayed few outward signs of religious extremism, officials say.
"He was seen more as a little failure from the projects," Ange Mancini, President Nicolas Sarkozy's top intelligence adviser, told France-24 TV on Friday.
Sarkozy told French radio that Merah went "from the most ordinary criminal delinquency, starting as a minor, to the most brutal terrorism with no warning, with no transition."
In seeking possible accomplices, authorities have focused on Merah's older brother, 30-year-old Abdelkader Merah, who is in custody and was handed preliminary charges for complicity in murder and terrorism Sunday for allegedly helping hatch the plot _ claims the brother denies, according to his defense lawyer.
The older Merah reportedly became Mohamed's mentor after their father returned to Algeria and the children went in and out of foster care.
Abdelkader, too, was known to authorities: He was implicated but never charged in an investigation in 2007 of a recruiting network for jihadists to fight in Iraq. In recent years, he traveled often to Egypt _ for sometimes months at a time _ to attend Quranic schools.
French police had known about Mohamed Merah since at least 2005 _ when he was convicted as a minor for receiving stolen property. It was the first of what would be a total of 15 convictions: eight while a juvenile, and seven for misdemeanors as an adult, said Elisabeth Allannic, a spokeswoman with the Paris prosecutors office. He was sent to prison for 18 months for aggravated theft in January 2008, she said.
But France's highly reputed counterterrorism officials first learned about him in November 2010, when he turned up in southern Afghanistan _ caught at a random roadway checkpoint by Afghan police and handed over to the U.S. military, which alerted French military intelligence.
That came at the tail end of a meandering road trip across the Middle East _ Turkey, Syria, Lebanon, Jordan, even Israel _ before he traveled to Egypt, where he met up with his brother in Cairo, the French official told The AP.
Merah then spent three weeks in Tajikistan before crossing over into Afghanistan. He was arrested in the southern city of Kandahar on Nov. 22, 2010, nine days after entering Afghanistan, and was flown to Kabul by U.S. forces.
A European intelligence official told The Associated Press that Merah was questioned by Afghan intelligence, which then told the French Embassy in Kabul about him _ but French authorities didn't pick him up. Merah flew home early the next month, of his own accord. The official spoke on condition of anonymity because he was not authorized to speak to the media.
After his arrest in Afghanistan, the United States quickly put Merah on its no-fly list. But French authorities did not, opting instead to put him under police surveillance after he returned home to southern France.
Under watch in the spring of 2011, Merah drew little suspicion, the French official close to the investigation told the AP. He partied, didn't go often to the mosque, was cordial with his neighbors and showed no violent inclinations.
By August 2011, with French police believing that he was not a threat, he was off again _ to Lahore, Pakistan. His mother had prodded him to go there to look for a wife, the French official said.
During that trip, French authorities went to his home in Toulouse and posted a summons for him to report in so they could question him about his earlier trip.
"Then he called us," the official said. "He must have been alerted by someone in his family ... He was very polite, saying, 'I'm busy, but I will call you when I get back.'"
While on his trip, he caught Hepatitis A and returned to France in October 2011 for treatment. This time, Merah called police from Purpan hospital in Toulouse to again delay the appointment. When it finally took place in November, Merah brought along a USB key with photos he had taken, telling his interrogators that his trip was for tourism.
"We weren't fooled," the French official told The AP. After further analysis, Merah was placed on a "wanted persons file" _ which would alert authorities any time in the future that he tried to use his passport to travel.
Merah, who generally worked odd jobs for a month or so at a time, at one point appeared to have considered a military career. He spent one night in July 2010 at a French Foreign Legion recruitment center in Toulouse _ as part of a standard information session, but left the next morning without an explanation, French army spokesman Col. Bruno Lafitte said.
Merah told police he received individualized training in Pakistan, according to Squarcini. He claimed to investigators that he was trained in Pakistan's restive Waziristan region.
But French officials have so far dismissed this theory.
"For the moment, nothing shows he was at training camps in Pakistan. Nothing," said Mancini, alluding to official "diverse sources" who keep watch on attendees of the Pakistani camps.
Merah's firearms _ including a Colt .45 and an automatic Sten pistol _ were unsophisticated and not uncommon in French housing projects. Prosecutors said that during the standoff, he claimed to have obtained (EURO)20,000 worth of weapons by theft _ which investigators doubt.
"The weapons he had were obsolete for a real jihadist," said Mancini. "Colt .45s _ these weapons date from Prohibition era in the United States ... A Sten? Those weapons were parachuted in by the English during World War II! A mini-Uzi? It's a relatively old style of weapon."
In the ethnically mixed Des Izards project where Merah grew up, residents said tensions grew palpably when they learned that the gunman was one of their own. A woman in an Islamic face veil recalled Merah driving past on his scooter, music blasting. Georges Baldachno, living there since 1964, lamented, "Now there is delinquency everywhere." A group of young men threw a rock to scare reporters away.
Johanna Decorse and Masha Macpherson in Toulouse and Kathy Gannon in Islamabad contributed to this report.
Jamey Keaten can be reached at http://twitter.com/jameykeaten