A US soldier has spoken of the moment he and a childhood friend prevented a gunman from opening fire on a passenger train from Amsterdam to northern France.

Alek Skarlatos, on holiday in Europe with fellow serviceman Spencer Stone and student Anthony Sadler, said he and his companions heard a gunshot and breaking glass while on their Thalys train at around 3.45pm on Friday.

“I saw a guy entering the carriage with an AK and a handgun, at that point I ducked down and my friend Spencer, next to me, ducked down and I just looked over at Spencer and said: ‘Let’s go’,” Mr Skalatos told Sky News from his hotel room in Arras, northern France.

The 22-year-old National Guardsman from Roseburg, Oregon, and Mr Stone charged the unidentified 26-year-old man, believed to be of Moroccan origin, down the narrow carriage.

"Then I grabbed the AK (assault rifle), which was at his feet, and started muzzle thumping him in the head with it," Mr Skarlatos added.

Mr Sadler, a senior at Sacramento State University, told The Associated Press of his friends' exploits: "Spencer makes first contact, he tackles the guy, Alek wrestles the gun away from him, and the gunman pulls out a boxcutter and slices Spencer a few times.

“And the three of us beat him until he was unconscious.

"The gunman never said a word."

It came as amateur video showing the aftermath of the struggle emerged.

Another passenger helped the men tie up the assailant while Mr Skalatos – who recently returned from a tour in Afghanistan – disabled the gunman’s weapons.

"In the aftermath, we saw that a man's throat had been split and he was bleeding profusely," Mr Sadler said.

Airman Mr Stone, who was injured himself in the hand during the tussle, performed first aid on the unidentified passenger.

Mr Sadler continued: "Spencer, who has some paramedics training, just clogged up his neck so he wouldn't die. This is all in the midst of Spencer bleeding profusely himself.”

"It was just really heroic of him to do something like that."

Mr Skarlatos added: "We just did what we had to do. You either run away or fight. We chose to fight and got lucky and didn't die."

The attack has been condemned by French Interior Minister Bernard Cazeneuv, who called it “an attack of barbaric violence”, and expressed his "gratitude and admiration" for the men’s actions.

A White House spokesperson also praised the men's actions.

“The President expressed his profound gratitude for the courage and quick thinking of several passengers, including US service members, who selflessly subdued the attacker, " a statement said.

“While the investigation into the attack is in its early stages, it is clear that their heroic actions may have prevented a far worse tragedy."

The three were met off the train, which was travelling through Belgium at the time of the attack, along with around 500 other passengers at the next station in Arras by French authorities.

Three people were injured in the attack, including a French actor who is believed to have hurt himself as he sounded the alarm.