NICE, France — There is mounting evidence that Mohamed Lahouaiej Bouhlel, the Tunisian-born truck driver responsible for the deadly carnage in Nice last week, had recently absorbed extremist ideas and had become radicalized, French authorities said Sunday.

The image of a religious extremist is at odds with the portrait that neighbors and family members initially painted of a man who ignored even the most basic rules of Islam, eating pork, drinking alcohol and shunning the mosque.

Many of those who knew him said in the days after Thursday’s Bastille Day attack that Bouhlel was a difficult person, describing him variously as aloof and hostile, even violent at times. In March, he received a suspended sentence for a road-rage incident – not enough to put him on the radar of France’s security services.

But officials said Sunday that the 31-year-old had apparently undergone a rapid conversion to radical Islam and carefully planned the attack that claimed the lives of at least 84 people, including 10 children, raising the question: How did a delivery driver go from petty crime to carrying out an act of mass slaughter in a few months?

Hours after the Islamic State claimed responsibility for the attack Saturday, Prime Minister Manuel Valls said authorities “now know that the killer radicalized very quickly.”

Neither the Islamic State nor the French government have provided tangible evidence of a link between the Islamic State and Bouhlel. But Valls told the newspaper the Journal du Dimanche in an interview Sunday that the extremist group “is encouraging individuals unknown to our services to stage attacks.”

“That is without a doubt the case in the Nice attack,” said Valls, warning that “terrorism will be part of our daily lives for a long time.”

While authorities have said little publicly about their investigation, a French security official said Sunday that Bouhlel sold his car just before the attack, which ended only when he was killed by police.

Bouhlel rented the refrigerated truck last Monday, bought a pistol and was seen on closed-circuit TV footage visiting the promenade in the following days, according to the security official.

On Bastille Day, Bouhlel sent text messages to people who may have been accomplices, the official said. One of those who received text messages was among eight people taken into custody after the attack.

At least two of the three people detained Sunday are suspected of helping Bouhlel obtain the pistol found in the truck, the official said.

Most of those taken in for questioning, including Bouhlel’s estranged wife, who has since been released, described him as violent and unstable. While they all said he had long been indifferent to religion, some described a recent and very rapid conversion to radical Islam, the official said.