The suspect, who was wrestled to the floor after opening fire with an assault rifle on a high-speed train on Friday evening, is believed to be a 26-year-old of Moroccan origin and is now being interrogated by counter-terrorist officials near Paris.
He is understood to have lived in both Spain and France, and a Spanish counter-terrorism source told AFP he travelled to war-torn Syria last year.
“Once in France he went to Syria, then returned to France,” the source said.
French Interior Minister Bernard Cazeneuve said Spanish intelligence services had flagged the man to the French authorities “due to his membership of the radical Islamist movement.”
Armed with a Kalashnikov assault rifle, an automatic pistol, nine cartridge clips and a box-cutter, the attacker opened fire on board the TGV train just after it crossed from Belgium into France on Friday evening.
But the attack was quickly stopped when passengers — including two US off-duty soldiers — charged the gunman and overpowered him.
“I looked back and saw a guy enter with a Kalashnikov. My friends and I got down and then I said 'Let's get him',” Alek Skarlatos, a 22-year-old member of the National Guard in Oregon, told France's BFMTV.
Spencer Stone, who is reportedly in the US Air Force, was the first to reach the gunman who slashed him in the neck and hand with a box-cutter.
A 62-year-old British consultant, Chris Norman, was also praised for helping subdue the gunman, as was a Frenchman who had earlier tried to stop him as he came out of the toilet carrying a gun.
The train heroes are to be received by President François Hollande at the Elysée Palace “in the coming days”, his office said in a statement.
Stone was taken to hospital along with another unnamed American passenger, who was hit in the shoulder with a bullet. Neither is in critical condition, Cazeneuve said.
Analysts said it was not surprising someone could launch an attack even though he was on a watch-list.
“It's the perennial problem of how you prioritise between serious concerns,” said Raffaello Pantucci, counter-terrorism expert at Royal United Services Institute in London.
“It's a very resource-intensive job to watch someone 24 hours a day. Intelligence agencies just aren't big enough to do that for everyone,” he said.