French prosecutors say the man arrested in Arras after being tackled by passengers on a Thalys train last week had links to radical Islam and had recently travelled to Turkey, and possibly Syria.
Senior prosecutor Francois Molins, formally opening an investigation, said it was clear that the 25-year-old Moroccan suspect, Ayoub El-Khazzani, had intended to carry out mass slaughter.
He told a news conference in Paris that El-Khazzani had watched an online recording inciting radical violence minutes before the thwarted attack on the train travelling from Amsterdam to Paris.
He said the gunman boarded the train in Brussels on Friday armed with:
- a Kalashnikov assault rifle
- 270 rounds of ammunition
- a Luger pistol
- a bottle of petrol
- a box-cutter
- a hammer
Mr Khazzani denies planning to launch a terrorist attack, saying he had come across a stash of weapons in a Belgian park and decided to use it to rob passengers.
Born in 1989 in Tetouan, in northern Morocco, Ayoub El-Khazzani is said to have arrived in Spain in 2007 where he was later granted residency.
"He sold hashish sometimes, like many do, to buy something to eat, pay the rent, but he was not a trafficker," Mohamed, a builder from his former Madrid neighbourhood, told AFP news agency.
"He was a good guy, normal, who played football with us right here. It's strange that he could have done this."
Mr Khazzani was detained several times in Spain for drug trafficking, French prosecutors say.
He came to the attention of anti-terror authorities for having jihadist beliefs and attending a radical mosque in the southern city of Algeciras.
The suspect was flagged up to France by the Spanish authorities in February 2014 as an Islamist extremist who may travel to France.
France train shooting
- A French passenger trying to access a toilet cubicle was faced with an individual who emerged from the cubicle "bare-chested, wearing a backpack on his chest and carrying a rifle slung across his shoulder". Read more about what we know so far
- The failed attack is a sign that a new anti-terror approach is needed, argues former French intelligence agent Claude Moniquet.
- French President Francois Hollande has personally awarded France's top honour to four passengers who foiled the suspected terror attack. Read about them here
- The attack, which saw the suspected gunman cross into France on an international Thalys train, has challenged the Schengen Agreement, the holy grail of European integration
But during a period of between five and seven months living in the French town of Aubervilliers, he did not emerge as a threat, Mr Molins said.
Mr Khazzani worked for mobile phone company Lycamobile in the town for two months before leaving because he did not have the right work documents.
He then moved between Cologne in Germany, the Austrian capital, Vienna, and Brussels where he said he had been living in a park near the city's Midi railway station.
Mr Khazzani says he was left homeless in Belgium after his identity documents were stolen. Prosecutors say he had been staying with his sister.
Mr Khazzani allegedly travelled to Turkey in May - something he has denied via his lawyer in Arras, as well as denying travelling to Syria.
Prosecutors described the suspect as a "fantasist" who had watched a jihadist YouTube recording on a mobile phone whilst already on the busy Thalys train.
He had locked himself in a toilet cubicle before emerging topless and armed.
The gunman was wrestled to the floor and subdued by two young American off-duty servicemen, their friend and a 62-year-old British consultant.
One of the US servicemen, Alek Skarlatos, disputed the gunman's claim that he just wanted to rob passengers because he was hungry.
He said he had a lot of ammunition and "his intentions were pretty clear", but that he appeared untrained.
"He clearly had no firearms training whatsoever."
"If he knew what he was doing, or even just got lucky... we would have all been in trouble and probably wouldn't be here today - along with a lot of other people."