While rival French politicians are blaming President Francois Holland's government for a failure of intelligence over the Nice massacre it has emerged that the killer had long-standing mental health issues.

According to both his father and his sister, Mohamed Lahouaiej-Bouhlel had suffered a mental breakdown and had spent years in Tunisia seeing psychologists before leaving for France in 2005

"My brother had psychological problems and we have given the police documents showing that he had been seeing psychologists for several years," his sister Rabeb Bouhlel said.

His father, also Mohamed, said the family had sought medical treatment after his son had a breakdown. "He had psychological problems that caused a nervous breakdown; he would become angry, shout, break everything around him."

Opposition politicians, however, have been quick to hold Hollande responsible over a failure to implement security measures recommended after previous atrocities. Alain Juppe, the mayor of Bordeaux and favourite to be the centre-right’s candidate in next year’s presidential election, claimed that the attack could have been prevented if the proper security measures had been in place.

And Marine Le Pen, leader of the far-right Front National, maintained that nothing had been done – “absolutely nothing” – to close jihadist mosques or deprive suspects of nationality.

Although there clearly are manifest failings in France’s intelligence-gathering it is difficult to see how even the best of intelligence could have prevented the attack. Mohamed Lahouaiej-Bouhlel was one of around 40,000 French-Tunisians in Nice. He was known to the police, but not for any Islamist-related activity.

The delivery driver certainly did fit the profile of almost all of those involved in extreme acts of violence and terrorism in France – aged between 18 to 36 (he was 31), with a record of petty crime, from a poor background and in low-paid or insecure employment. But that profile fits hundreds of thousands of people of all ethnic backgrounds in France.

What might be different in this case is that he had been treated for psychiatric problems in the past.

It was undoubtedly an act of terrorism and he is now being linked to Islamic State – the group has claimed him as one of their ‘soldiers’ – but it appears that he acted independently, although five people were yesterday arrested in police raids, including his estranged wife. The attack was certainly in line with an IS call to action against the country.

France is a particular IS target. In September 2014, shortly after the start of the coalition’s airstrikes on the group's bases in Syria, the chief IS spokesman named the “spiteful French” among a list of enemies and called on sympathisers to launch attacks. Interrogations of IS returnees revealed that the group was planning attacks on France even before it seized Mosul and declared its caliphate in 2014.

The French government has also taken a hard line on issues sensitive to Muslims, such as banning full-body coverings and the veil in public. France has also taken a prominent military role in Islamic countries, in Libya, in Mali, where French troops defeated an Islamic militant insurgency, and in the US-led coalition against IS.

So could, and should, the security services have picked out Lahouaiej-Bouhlel as a potential mass killer?

It certainly is the case that French intelligence-gathering is chaotic. There are six different security agencies, answering variously to the interior, defence and economy ministries, but there appears to be little co-ordination. A French parliamentary inquiry into last year’s terrorist attacks in Paris highlighted a “global failure” of French intelligence and called for the creation of a single, US-style national counter-terrorism agency. Overseas intelligence agencies also complained to the inquiry that it was impossible to work with such a bureaucratic mess. So far, nothing has changed.

The man who headed the commission of inquiry, Georges Fenech, compared the cumbersome, multi-agency apparatus to an army of soldiers wearing lead boots.

After the November Paris attacks Hollande imposed a national emergency, which he extended by three-months, even as the bodies were still being taken from the promenade in Nice. This allows police to conduct house raids and searches without a warrant or judicial overview and gives officials extra powers to place people under house arrest. But critics claim that these are just cosmetic measures.

According to Fenech, the state of emergency solves nothing and the 10,000 soldiers who now patrol French streets in a high-visibility operation called Operation Sentinelle are merely a reassurance to the public, not any kind of deterrent. The French interior minister last week rejected the main recommendation of the Fenech inquiry, ruling out the overhaul of the intelligence services.

France is undoubtedly seen by jihadis as the standard bearer of secular western liberalism, an atheist power bent on imposing its ideals such as democracy and free speech on the Islamic world. But it may well be that this apparent hard line, on issues like the wearing of the veil, has also convinced ordinary Muslims that their beliefs are under attack and they may be less willing to pass on intelligence information to the authorities.

It is difficult to see how the most sophisticated intelligence operation could have stopped Lahouaiej-Bouhlel. He seemed to have little interest in religion, was not known to pray at militant Salafist mosques, was not apparently linked to IS, except perhaps in his head, and may well be, in the end, just a violently-inclined loner with, perhaps, mental health issues.

Islamic attackers in the past have chosen weapons that can be obtained with relative ease. And what could be easier than a goods driver hiring a lorry and then turning it into a weapon of mass murder. The men who killed 130 people in Paris in November last year, those who attacked the city in January at the offices of Charlie Hebdo, and the man who opened fire on a high-speed train last summer all obtained their weapons in Belgium, am easy source of illegal guns, and it could be that Lahouaiej-Bouhlel and his associates, if any, also bought their's there. The police inquiry will answer this.

But what can be concluded, even at this early stage, is that, at a time of national emergency, on an emblematic date for France, Bastille Day, when the authorities must have been aware of the possibility of a spectacular attack, the precautions in Nice were abysmal. Allegedly less than 120 police were on duty, when there should have been many times more. Lahouaiej-Bouhlel’s hired truck was able to by-pass whatever barriers were there, either by subterfuge or by driving through them, and the Sentinelle’s soldiers were conspicuously absent from the streets. There may not be have been intelligence failures, but there certainly was a security failure.