France train shooting: What we know
French President Francois Hollande has announced the award of the country's highest award - the Legion d'honneur - to six passengers who tackled a suspected radical Islamist on board a train travelling from Amsterdam to Paris.
Here's what we know about what happened.
How it started
The drama took place on board a high-speed train travelling from Amsterdam to Paris, via Brussels, on Friday afternoon.
The journey was apparently uneventful until the train, operated by Thalys, reached Oignies in northern France, having just crossed from Belgium.
French prosecutor Francois Molins said a French passenger in carriage 12 who was trying to access a toilet cubicle was faced with an individual who emerged from the cubicle "bare-chested, wearing a backpack on his chest and carrying a rifle slung across his shoulder".
Mr Molins said the man was also in possession of an automatic pistol, nine cartridge clips, a bottle of petrol and a box-cutter.
The unnamed French passenger tried to overpower the man.
Seeing the struggle, 51-year-old French-American passenger Mark Moogalian also tried to intervene.
But the gunmen fired several shots and Mr Moogalian was hit in the neck.
How the gunman was subdued
Three American friends on a tour of Europe - off-duty military servicemen Spencer Stone and Alek Skarlatos, and Anthony Sadler - were also in the first class carriage.
They had initially been unable to find their first class reservations and had moved to this carriage to get a better internet connection. They were all sleeping when the commotion woke them.
Seeing the suspect had freed himself from the Frenchman who first tackled him, the Americans charged the gunman.
"Alek just yells, 'Spencer, go!' And Spencer runs down the aisle," Mr Sadler said.
"Spencer makes first contact, he tackles the guy, Alek wrestles the gun away from him, and the gunman pulls out a box cutter and slices Spencer a few times."
Mr Stone was slashed in the neck and eyebrow with the box-cutter and had a thumb almost sliced off.
Mr Stone held the suspect in a chokehold and Mr Skarlatos hit him in the head with the butt of one of the weapons.
The three men tied him up with the help of British businessman Chris Norman.
Mr Stone - despite having sustained injuries himself - then went to the aid of Mr Moogalian, who was losing blood.
Mr Stone said: "I just stuck two of my fingers in the hole, found what I thought to be the artery, pushed down and the bleeding stopped. I just said 'Thank God' and held that position until the paramedics got there."
Mr Hollande said Mr Stone had "probably saved Mr Moogalian's life".
Meanwhile, the train staff alerted authorities as to what had happened. As the train slowed down and passed through Henin Beaumont station, several frightened passengers broke the windows and escaped the train, according to Mr Molins.
The gunman was held until he could be arrested at Arras station.
Who is the gunman?
The suspect was named as Ayoub El-Khazzani, a 25-year-old Moroccan.
Investigators say Mr Khazzani was born on 3 September 1989 in Tetouan in Morocco and lived in the Spanish city of Algeciras.
They say he frequently attended the city's Takwa mosque, "known for its radical preaching", according to Mr Molins, and for which his brother was the treasurer.
Mr Molins said he had been convicted of several offences in Spain, including drug trafficking and traffic offence, and has been given at least two prison sentences.
According to Mr Molins, Mr Khazzani had travelled through several European countries in recent years.
Mr Molins said Mr Khazzani had returned to Europe from Turkey in June 2015. Prosecutors believe his presence in Turkey may indicate he went to war-torn Syria.
Mr Molins said he had also spent "five to seven months" living in the Paris suburb of Aubervilliers in 2014, during which time he had worked for a mobile phone company for two months.
The suspect was flagged up to France by the Spanish authorities in February 2014 as affiliated to a radical Islamist movement.
Mr Khazzani says he was left homeless after his identity documents were stolen. In the last six months, he says he travelled to Spain, Andorra, Belgium, Austria, Germany and France, but denies travelling to Turkey or Syria, according to his lawyer.
Mr Khazzani apparently did "not understand why this story has become so inflated," his lawyer told Le Parisien newspaper (in French).
"He said he wanted to extract money from the passengers on this Thalys train and nothing else. He denies any terrorist intent to his actions. This is almost laughable, he says."
The lawyer added that Mr Khazzani said he had found the rifle and Luger gun he used in the attack in a suitcase left in a park, near the Brussels station where he used to sleep.
Mr Molins said that this had been Mr Khazzani's initial version of events under questioning but that his explanation had grown less and less lucid and that he eventually stopped speaking to investigators at all.
He said that analysis of Mr Khazzani's phone revealed he had watched a YouTube audio file whilst already on the Thalys train "in which an individual called on the faithful to fight and take up arms in the name of the Prophet".
Mr Khazzani's father, Mohamed el-Khazzani, told the Daily Telegraph in Algeciras, Spain, that his son was a "good boy" interested in "football and fishing".
He later told El Mundo: "They are saying Ayoub is a terrorist but I simply can't believe it. Why would he want to kill anyone? It makes no sense. The only terrorism he is guilty of is terrorism for bread; he doesn't have enough money to feed himself properly."
French actor Jean-Hugues Anglade, who injured his hand as he tried to activate the train's alarm, told Paris Match (in French) that members of staff ran through his carriage (next to carriage 12 where the melee took place) to the guards' van at the end of the train.
They opened the door with a special key and locked themselves in, he alleged.
"We shouted for the staff to let us in, we yelled 'open!'", he said. "There was no response."
However Agnes Ogier, the boss of Thalys, denied Mr Anglade's allegations, saying train staff "fulfilled their duties".
One member of staff found himself under fire and took five or six passengers with him into the baggage car, where he sounded the alarm, she said.
Mr Hollande praised the actions of the staff when handing the Legion d'honneur to four of the passengers.