The attack on a Jewish school that left three young children and a rabbi dead was an “opportunistic” outburst, French spy chief Ange Mancini has said. The Toulouse gunman had been planning to kill another French soldier instead.

­“It wasn't the school that he wanted to attack,” Mancini, intelligence coordinator for French President Nicolas Sarkozy, said on French TV.

Mancini said Mohamed Merah was planning to kill a soldier in Toulouse on Monday, but arrived too late and missed the original target. He then decided to carry out an unplanned attack on a nearby Jewish school.

Mohamed Merah, a 23-year-old Frenchman of Algerian descent, carried out three deadly attacks in and around Toulouse, killing three French soldiers, three Jewish children and a rabbi. He recorded each of the three attacks on video – a move which shows a lack of “professionalism” security officials believe.

“It is very telling that he filmed his exploits,'' Europol chief Rob Wainwright said. “Still, in spite of the mistakes, he managed to carry out significant damage.”

Despite the fact that the gunman seemed to be divided between wanting to increase the death toll and bragging about his deeds, his attacks were certainly inspired by Al-Qaeda, Wainwright added.

Authorities had been tracking Merah for several years before the tragic events. They knew he espoused a radical form of Islam and had been in Afghanistan and Pakistan, allegedly receiving training in militant camps. He was even put on the US no-fly list as a suspected terrorist.

French officials, however, are fending off accusations of incompetence on the part of anti-terrorism authorities. “There was no sign he had trained or been in contact with organized groups or jihadists," a senior official who is close to the investigation told the Associated Press.

Merah himself claimed he was in touch with Al-Qaeda and even received instructions from the group to carry out a suicide blast, which he refused to do. But the authorities have absolutely no reason to believe that he was “commissioned by Al-Qaida to carry out these attacks,” AP reported, citing the same official.

The official suggested that Merah used the well-known Al-Qaeda “brand” to increase the impact of his acts.

Meanwhile, another security official said that preventing such individualized and decentralized terror is a real challenge, because “there are hosts of people” who simply think extremist thoughts and “most of them will never do anything.”

Mohamed Merah was killed on Thursday in a shootout after police raided the Toulouse apartment where he had been holed up for 32 hours. Five riot police officers were injured in two attempts on Merah’s premises.