A suspected Islamist extremist went on trial Monday in Paris for an attack aboard a high-speed train in 2015 that injured several passengers before three Americans brought him down.

Moroccan national Ayoub El Khazzani, 31, boarded the train traveling from Amsterdam to Paris on Aug. 21, 2015, with an arsenal of weapons. He shot one passenger and injured two others with a cutter.

FRANCE MARKS 5 YEARS SINCE DEADLY ATTACKS ON BATACLAN, CAFES

The three Americans – two U.S. servicemen and a student – who thwarted the attack are expected to testify in the monthlong trial.

Their lawyer, Thibault de Montbrial, said at the courthouse Monday that their "very brave intervention" had thwarted a “slaughter.”

French President Francois Hollande bids farewell to U.S. Airman Spencer Stone as U.S. National Guardsman Alek Skarlatos of Roseburg, Ore., second from left, and Anthony Sadler, a senior at Sacramento State University in California, right, after Hollande awarded them the French Legion of Honor at the Elysee Palace in Paris. (AP Photo/Michel Euler, File)

“This terror attack could have killed up to 300 people based on the number of ammunition that was found on the terrorist and in his bag,” he said.

Clint Eastwood turned the dramatic incident into a Hollywood film, “The 15:17 to Paris."

El Khazzani appeared in court Monday flanked by security guards while the trial opening largely dealt with procedural issues, including whether Eastwood would be needed. The actor-director has not yet responded to a summons.

FRANCE'S MACRON VOWS TO CRACKDOWN ON ILLEGAL IMMIGRATION TO COUNTER GROWING 'TERRORIST THREAT'

The 31-year-old Moroccan spent several months in Syria and boarded the train in Brussels heavily armed, authorities said. He is charged with attempted terrorist murder. If convicted, he faces a maximum sentence of life in prison.

Three others, who weren't on the train, also are being tried as alleged accomplices.

In this Aug.21, 2015 file photo, a police officer videos the crime scene inside a Thalys train at Arras train station, northern France, after a gunman opened fire with an automatic weapon. (AP Photo, File)

El Khazzani emerged bare-chested from a restroom between cars armed with a Kalashnikov, nine clips with 30 rounds each, an automatic pistol and a cutter, according to investigators. He shot a French-American man with the pistol after he wrestled the Kalashnikov away.

Spencer Stone, then a 23-year-old U.S. airman, has said he was coming out of a deep sleep when the gunman appeared. He said that Alek Skarlatos, then a 22-year-old U.S. National Guardsman recently back from Afghanistan, “just hit me on the shoulder and said ‘Let’s go.’”

The men, all from California, snapped into action out of what Skarlatos said at a news conference days later was “gut instinct.” Stone and Skarlatos moved in to tackle the gunman and take his gun. A third man, Anthony Sadler, 23, then a student, helped subdue the assailant.

CLICK HERE TO GET THE FOX NEWS APP

El Khazzani was arrested in Arras, where the train was rerouted.

The Associated Press contributed to this report.