NICE, France - Mohamed Lahouaiej Bouhlel, the man who slammed his truck into a Bastille Day crowd in Nice, was a fast-living petty criminal who drank, did drugs and had an "unbridled" sex life up until a few months ago.
It was only recently that the 31-year-old Tunisian father of three began to trawl the internet for Islamic State group propaganda and pictures of corpses, investigators said Monday.
Paris prosecutor Francois Molins said acquaintances had described him as someone who "was not a practising Muslim, ate pork, drank alcohol, took drugs and had an unbridled sex life".
The longtime Nice resident had, however, showed "a clear, recent interest for the radical jihadist movement." He told a friend he had become "used to" watching videos of hostages being decapitated by IS.
Investigators said they found "very violent" pictures of corpses on his computer.
But Molins said there was no evidence the delivery driver had sworn allegiance to the jihadist group, which claimed responsibility for his attack.
In his internet searches Bouhlel looked for information about the terror attack on a gay nightclub in Orlando that left 49 dead, and the Paris suburb of Magnanville - where a police couple were killed last month by a man claiming links to IS.
He was known to French police for a series of fracas but had never made it onto the radar of intelligence services.
He had come to France from the northeastern Tunisian town of Msaken in 2005. A year later he gained residency and married a French woman of Tunisian origin.
Patrons of the small Nice gym where the brawny bodybuilder was a regular until two years ago and took salsa classes for a time, recalled him as a vain "show-off".
One woman on whom he had designs described him as someone "who flirted with anything that moved".
A 74-year-old man questioned by investigators is said by some to have been among his lovers.
But he also had a reputation for violence, including with his wife and three small children.
One former neighbour, who also asked not to be named, said he lashed out after his wife requested a divorce about 18 months ago.
"He defecated everywhere, he cut up his daughter's teddy bear and slashed the mattress.
"I don't think there was a radicalisation issue, I think there was a psychiatric problem," he added.
His father, who lost touch with him years ago, told AFP his son had a history of depression.
"From 2002 to 2004, he had problems that caused a nervous breakdown. He would become angry and he shouted... he would break anything he saw in front of him." His police record includes complaints for "threats, violence, theft and acts of criminal damage".
In March, Bouhlel received a six-month suspended jail sentence over a confrontation after a car accident.
Earlier this month, he stopped shaving his beard, citing "religious" motivations to friends.
He staked out the site of the carnage in Nice, the Promenade des Anglais, on several occasions before he struck. Hours prior to the attack, he took selfies on the seafront.
A South African man who looked on in horror as he careened through the crowd on the Nice promenade, said he looked "calm".
John Lambert told his country's ENCA channel: "It was almost like he was playing a video game, he was just focused on his job, trying to hit as many as possible."