A Moroccan man and three alleged accomplices went on trial in France Monday for an attempted terror attack on an Amsterdam-Paris train five years ago that was foiled by passengers whose heroic actions were turned into a Hollywood film.

Director Clint Eastwood, 90, is on the witness list for the trial in Paris, scheduled to last until December 17. It is believed his 2018 film "The 15:17 to Paris" will serve as a reconstruction of the events of August 21, 2015.

Gunman Ayoub El Khazzani was tackled by passengers shortly after emerging bare-chested and heavily armed from a toilet on a Thalys high-speed train.

There were some 150 passengers in the carriage with Khazzani, who had an AK47 slung over his back, and a bag of nearly 300 rounds of ammunition.

The Thalys assault happened in the same year as the attack on the satirical magazine Charlie Hebdo
The Thalys assault happened in the same year as the attack on the satirical magazine Charlie Hebdo AFP / PHILIPPE HUGUEN

One of them, Franco-American professor Mark Moogalian, grabbed Khazzani's assault rifle as he emerged.

The attacker took a pistol out of his belt, shot and wounded Moogalian, and reclaimed the AK47 only to be tackled afresh and disarmed by two US soldiers -- Spencer Stone and Alek Skarlatos -- who heard the commotion from a neighbouring carriage.

The soldiers were aided by their friend Anthony Sadler, with whom they were backpacking through Europe.

Spencer Stone (L), Anthony Sadler (C) and Alek Skarlatos (R) are credited with thwarting the terrorist attack in August 2015
Spencer Stone (L), Anthony Sadler (C) and Alek Skarlatos (R) are credited with thwarting the terrorist attack in August 2015 AFP / Lionel BONAVENTURE

Stone was slashed in the neck and on an eyebrow and almost had his thumb sliced off with a box-cutter wielded by Khazzani.

"He had 270 rounds of ammunition on him, enough to kill 300 people," according to Thibault de Montbrial, the lawyer for the three Americans.

The lawyer argues there was no doubt his clients had prevented a "mass attack".

Khazzani, who joined the Islamic State group in Syria in May 2015, is charged with "attempted terrorist murder".

Lawyer Jean Weil (R), representing the railways, enters the court for the trial of a Moroccan over a foiled terror attack on an Amsterdam-Paris train in August 2015
Lawyer Jean Weil (R), representing the railways, enters the court for the trial of a Moroccan over a foiled terror attack on an Amsterdam-Paris train in August 2015 AFP / THOMAS COEX

The 31-year-old appeared in court dressed in a blue denim shirt, his black hair tied back, confirming his identity to the judges and stating his former profession in "patisserie" (pastry).

He was joined in the dock by three men facing charges for aiding and abetting the crime: Bilal Chatra, Redouane Sebbar and Mohamed Bakkali.

Also present in court to face his attacker was Moogalian, accompanied by his wife.

The train assault happened in the same year as the December 15 massacre of staff at the Charlie Hebdo satirical magazine, the killing of a policewoman, and a deadly hostage siege at a Jewish supermarket -- three days of violence that left 17 dead.

In November the same year, jihadists armed with assault rifles and explosives struck simultaneously outside the national stadium, Paris cafes and the Bataclan concert hall, killing 130 people and wounding more than 350 in France's deadliest peace-time attack.

Co-accused Chatra is charged with having acted as an advance scout for Khazzani to get into Europe via the migrant trail from Syria.

The other two are accused of having helped Khazzani and Belgian Abdelhamid Abaaoud -- believed to have been one of the masterminds behind the Thalys and November 13 attacks -- to enter Europe and set up a jihadist cell.

Police killed Abaaoud after he shot indiscriminately at packed cafe terraces in Paris on the night of the coordinated attacks, for which Bakkali is also accused of having acted as logistics coordinator.

The three Americans, who along with Moogalian played themselves in Eastwood's film, would attend the trial on Thursday and Friday this week, days set aside for witness testimony from train passengers, the court heard.

The trial comes at a time of heightened security alert in France following three attacks blamed on jihadists in a month -- a knife attack outside Charlie Hebdo's former offices, the beheading of a history teacher, and a deadly stabbing spree at a church in Nice.

Khazzani does not deny having boarded the train with the intent of committing an attack, but claims to have had a change of heart at the last minute, too late to avoid the confrontation with the Americans.

His lawyer Sarah Mauger-Poliak says Khazzani is a changed man who has rejected radical Islamist doctrine and regrets his actions.