"Everything happened very fast," Anthony Sadler, a student travelling with friends Alex Skarlatos and Spencer Stone, both members of the US military, told the media.
"I didn't realise what was happening until I saw a guard run past. 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'," said Skarlatos, a 22-year-old member of the National Guard in Oregon, who has recently returned from service in Afghanistan.
Stone tackled the gunman but was cut with a knife.
"At that point I showed up and grabbed the gun from him and basically started beating him in the head until he fell unconscious," said Skarlatos.
Also Read
Sadler added that the man - later identified as a 26-year-old of Moroccan origin - "didn't stand a chance."
"As soon as we saw him, we all ran back there. It all happened really fast," said Sadler.
Mobile phone footage from inside the train and shown on several TV stations shows the suspect, a skinny man wearing white trousers and no shirt, flattened on the floor of the train with his hands and feet tied behind his back.
A Kalashnikov is seen leaning against a seat and blood is visible on a window.
Sadler said he had spoken to Stone, recovering from the knife wound in hospital, adding that he was "doing well".
President Barack Obama singled out the Americans, saying "it is clear that their heroic actions may have prevented a far worse tragedy."
French Interior Minister Bernard Cazeneuve said the group showed "great bravery."
"Without their cool-headed actions we could have been faced with a terrible incident," he said.