After family members of the driver who slammed a truck into a holiday crowd in the French city of Nice said he suffered from depression, questions have been raised again about the links between mental illness, extreme ideology and mass violence.

Mental illness cannot be blamed for terror attacks, experts say. The overwhelming majority of people with mental illness never turn violent. But mental health disorders may make some people more susceptible to extremist ideology, and in rare cases that ideology can lead to horrific acts.

"People who are loners and who become angry and resentful can easily be drawn to extremist ideologies," said Dr. Raj Persaud, a psychiatrist and professor at London's Gresham College. "They begin to dehumanize others and may not need much more motivation before deciding to commit a terrorist attack."

It is not known for sure that the Nice attacker, 31-year-old Mohamed Lahouaiyej Bouhlel, was mentally ill. It is also unclear whether he was acting out of personal impulse or was driven by ideology. But the Nice attack and other recent ones, like the attack at a nightclub in Orlando, have involved a murky mix of extreme ideology and hints of mental illness.

Get Breaking News Delivered to Your Inbox

"Terrorist acts are not caused by mental illness but mental illness can provide a background that's receptive to terrorist activity," said Persaud.

Relatives of Bouhlel say he was once prescribed anti-psychotic medication. They describe an angry young man estranged from his wife and withdrawn from society. Bouhlel's uncle in Tunisia, Sadok Bouhlel, told The Associated Press that his nephew's family problems made him vulnerable to an Algerian recruiter for the Islamic State group who converted him in just two weeks.

Still, there are angry men estranged from their wives and withdrawn from society around the world who will never feel the impulse to slaughter a crowd of innocent people.

Paul Gill, a senior lecturer in security and crime science at University College London, says mass attacks are often triggered by a constellation of problems and do not depend on a mental health disorder.

"Just because you have psychological issues, it doesn't mean you will turn to violence," he said.

He said there's a higher rate of mental health issues among "lone wolf attackers" as opposed to people involved in a terrorist network, according to his study of more than 100 such assailants. Among those in his research were the 2005 London suicide bombers and Anders Breivik, the right-wing Norwegian who killed 77 people in a shooting-and-bombing rampage.

Other experts said the decision of some attackers to align themselves with an extremist ideology can be driven more by opportunism than beliefs.

"The driver in Nice is better thought of as a spree killer than a terrorist," said David Canter, director of the International Research Centre for Investigative Psychology at Huddersfield University in Britain.

"For these killers, like the German pilot who drove his plane into the Alps or the Columbine schoolboys, their acts are really despairing suicides," he said in an email. "Mentally ill killers will hook onto whatever is in the wind at the time they want to express their anger and frustration."

The potential link between mental health problems and terror attacks has also been raised as a possible motive for Unabomber Theodore Kaczynski, who was diagnosed with paranoid schizophrenia. And after Omar Mateen killed 49 people at an gay nightclub in Orlando, he was described by his ex-wife as "mentally unstable and mentally ill," according to press reports.

Still, the vast amount of research on people with mental health problems and violence suggest that they are much more likely to pose a danger to themselves than to others.

"It would be stigmatizing to say that we should focus on people with mental health problems as vulnerable and potential risks for radicalization," said Ariane Bazan, a professor of clinical psychology at the Universite Libre in Brussels. "There are so many other things to look at."

As the investigation into the Nice attack continues, French prosecutor Francois Molins said Monday that searches of Bouhlel's computer showed he had a clear, recent interest in "radical jihadism" and that he had recently conducted internet searches for Islamic propaganda chants, the Orlando nightclub attack, and the killings of police officers in Dallas and in Magnanville, France.

Persaud said Bouhlel's quick adoption of extremist beliefs was likely the result of a long transformation into a troubled, disenfranchised and resentful individual that may have been worsened by pre-existing mental health problems.

"No personality disorder will cause somebody to turn into a terrorist," he said. "But these extremist ideologies can suddenly begin to make sense to someone who is deeply disturbed and (may) rationalize all of their anger."